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
|
||||
fi
|
||||
done
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "unknown option $1" >&2
|
||||
|
@ -134,6 +133,8 @@ while getopts "$short_options" arg; do
|
|||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1))
|
||||
|
||||
case "$1" in
|
||||
create)
|
||||
shift
|
||||
|
|
|
@ -23,7 +23,6 @@ while getopts "$short_options" arg; do
|
|||
case "$arg" in
|
||||
s)
|
||||
TARBACK_REMOTE="$OPTARG"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "unknown option $1" >&2
|
||||
|
|
Loading…
Reference in a new issue