Add support for long options without =

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

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

Loading…
Cancel
Save