Fix options to allow --warn-exit in eol-branch.sh

The --warn-exit option was recently added except that the getopt
parsing wasn't appropriately updated and thus rejected the flags.

The flag also doesn't take a positional argument, so fix the argument
shifting.

Change-Id: I9671f79a969a7e5f9aaff9edaf235406d77b2da8
This commit is contained in:
Joshua Hesketh 2017-09-20 20:52:24 +10:00
parent cd98fe341b
commit 426adf852a
1 changed files with 1 additions and 2 deletions

View File

@ -22,7 +22,7 @@ function print_help {
echo ""
}
OPTS=`getopt -o dhq --long eol-message:,dry,help,quiet,remote: -n $0 -- "$@"`
OPTS=`getopt -o dhqw --long eol-message:,dry,help,quiet,remote:,warn-exit -n $0 -- "$@"`
if [ $? != 0 ] ; then
echo "Failed parsing options." >&2
print_help
@ -64,7 +64,6 @@ while true; do
-w|--warn-exit)
WARN_EXIT=true
shift
shift
;;
--)
shift