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