Add support for long options without =

Closes #12
break
noctuid 9 years ago
parent 40917af009
commit fb60bd6642

@ -84,9 +84,10 @@ do
OPTION=${OPTARG%%=*} OPTION=${OPTARG%%=*}
OPTARG=${OPTARG#*=} OPTARG=${OPTARG#*=}
else else
echo "Long options with args must be written as --opt=val." | \ OPTION=$OPTARG
tee -a /tmp/tdrop/log # shellcheck disable=SC2124
exit 1 OPTARG=${@:$OPTIND:1}
((OPTIND++))
fi fi
case $OPTION in case $OPTION in
height) height=$OPTARG;; height) height=$OPTARG;;

Loading…
Cancel
Save