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:
parent
d2d93f7273
commit
0d91133bef
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue