From: Evan Hunt Date: Wed, 11 Jul 2018 04:00:48 +0000 (-0700) Subject: fixed an argument counting bug X-Git-Tag: v9.13.3~113^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8f32ac1fca02d507f9e51082a2fdc15b1a09d60;p=thirdparty%2Fbind9.git fixed an argument counting bug --- diff --git a/util/git-replay-merge.sh b/util/git-replay-merge.sh index 2371c5f973d..964c5a16037 100755 --- a/util/git-replay-merge.sh +++ b/util/git-replay-merge.sh @@ -94,10 +94,6 @@ branch_exists() { } go() { - if [[ $# -ne 3 ]]; then - die_with_usage - fi - die_if_in_progress # Process parameters. SOURCE_COMMIT="$1" TARGET_REMOTE="$2" @@ -194,8 +190,14 @@ cleanup() { } next_action="go" -while [[ $# -gt 3 ]]; do +while [[ $# -ge 1 ]]; do case "$1" in + "--no-push") + DONT_PUSH=true + ;; + "--push") + DONT_PUSH=false + ;; "--abort") die_if_not_in_progress source "${STATE_FILE}" @@ -207,11 +209,11 @@ while [[ $# -gt 3 ]]; do source "${STATE_FILE}" next_action="resume" ;; - "--no-push") - DONT_PUSH=true - ;; - "--push") - DONT_PUSH=false + *) + if [[ $# -ne 3 ]]; then + die_with_usage + fi + break ;; esac shift