From f6b604ff4935462e3f532f2575b99eee1cd42e6f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Aug 2019 02:10:50 -0500 Subject: [PATCH] Helper Script tweaks --- buildroot/share/git/mfinfo | 6 +++--- buildroot/share/git/mfqp | 2 +- buildroot/share/git/mfrb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildroot/share/git/mfinfo b/buildroot/share/git/mfinfo index 3249473b8947..aa4e96b803eb 100755 --- a/buildroot/share/git/mfinfo +++ b/buildroot/share/git/mfinfo @@ -32,7 +32,7 @@ while [[ $# -gt 0 ]]; do opt="$1" ; shift ; val="$1" IFS='=' read -a PARTS <<<"$opt" - [[ "${PARTS[1]}" != "" ]] && { HAS_EQUALS=1 ; opt="${PARTS[0]}" ; val="${PARTS[1]}" ; } + [[ "${PARTS[1]}" != "" ]] && { EQUALS=1 ; opt="${PARTS[0]}" ; val="${PARTS[1]}" ; } GOODVAL=1 if [[ "$val" =~ ^-{1,2}.* || ! "$opt" =~ ^-{1,2}.* ]]; then @@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do fi case "$opt" in - -*|--*) MORE="$MORE$opt " ; [[ $HAS_EQUALS ]] && MORE="$MORE=$val" ;; + -*|--*) MORE="$MORE$opt " ; [[ $EQUALS == 1 ]] && MORE="$MORE=$val" ;; 1|2) INDEX=$opt ;; *) BRANCH="$opt" ;; esac @@ -55,6 +55,6 @@ esac [[ $BRANCH =~ ^[0-9]$ ]] && USAGE=1 -[[ $USAGE ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; } echo "$ORG $FORK $REPO $TARG $BRANCH $CURR $MORE" diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index efc76fb3e938..7f950da59d16 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -24,7 +24,7 @@ done [[ ${INFO[4]} =~ [0-9] ]] && USAGE=1 -[[ $USAGE ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } git add . git commit -m "patch" diff --git a/buildroot/share/git/mfrb b/buildroot/share/git/mfrb index a3b4ce267c02..e09dd87cdaab 100755 --- a/buildroot/share/git/mfrb +++ b/buildroot/share/git/mfrb @@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do let IND+=1 done -[[ $USAGE ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } # If the branch isn't currently the PR target if [[ $TARG != $CURR ]]; then