From: Travis Cross Date: Mon, 7 May 2012 21:47:25 +0000 (+0000) Subject: tagscript: refactor X-Git-Tag: v1.2-rc1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d96736c19e0b46117a0e5d3f7a7acbc162a1f7e1;p=thirdparty%2Ffreeswitch.git tagscript: refactor --- diff --git a/scripts/tagscript.sh b/scripts/tagscript.sh index 005fab5499..12fafc42ff 100755 --- a/scripts/tagscript.sh +++ b/scripts/tagscript.sh @@ -44,10 +44,9 @@ if [ -z "$1" ]; then fi eval $(parse_version "$1") +ngrep () { (echo "$2" | grep -e "$1" >/dev/null); } -ngrep () { grep -e "$1" >/dev/null; } - -if ! $debug && ! (echo "$opts" | ngrep '-s'); then +if ! ($debug || ngrep '-s' "$opts"); then cat >&2 <&2 ret=$(git stash save "Save uncommitted changes before tagging.") -if (echo "$ret" | ngrep '^Saved'); then +if (ngrep '^Saved' "$ret"); then stash_saved=1 fi