Fix handling of arguments in autohelp-wrapper

The shift should happen after the final processing, otherwise
getopts aborts if more than one parameter is given.

Change-Id: I47e9f390cfe08404e71b26c49b02871b3b34f303
This commit is contained in:
Andreas Jaeger 2014-09-07 09:35:21 +02:00
parent d2d93f7273
commit 0d91133bef
1 changed files with 1 additions and 4 deletions

View File

@ -104,19 +104,15 @@ while getopts :b:e:cf opt; do
case $opt in case $opt in
b) b)
BRANCH=$OPTARG BRANCH=$OPTARG
shift 2
;; ;;
c) c)
rm -rf $VENVDIR rm -rf $VENVDIR
shift
;; ;;
e) e)
VENVDIR=$OPTARG VENVDIR=$OPTARG
shift 2
;; ;;
f) f)
FAST=1 FAST=1
shift
;; ;;
\?) \?)
usage usage
@ -124,6 +120,7 @@ while getopts :b:e:cf opt; do
;; ;;
esac esac
done done
shift $(($OPTIND - 1))
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
usage usage