Shift by OPTIND-1 after parsing, instead of during.
This commit is contained in:
parent
35a4fa28f8
commit
d8c6d40dd9
2 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,6 @@ while getopts "$short_options" arg; do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
shift 2
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unknown option $1" >&2
|
echo "unknown option $1" >&2
|
||||||
|
@ -134,6 +133,8 @@ while getopts "$short_options" arg; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
create)
|
create)
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -23,7 +23,6 @@ while getopts "$short_options" arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
s)
|
s)
|
||||||
TARBACK_REMOTE="$OPTARG"
|
TARBACK_REMOTE="$OPTARG"
|
||||||
shift 2
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unknown option $1" >&2
|
echo "unknown option $1" >&2
|
||||||
|
|
Loading…
Reference in a new issue