Merge pull request #80 from demonbane/fix-getopt

Fix to allow combined command-line options
This commit is contained in:
Henric Andersson 2016-07-26 16:52:19 -07:00 committed by GitHub
commit 357e716866

View file

@ -165,7 +165,12 @@ usage() {
# Parse commandline
ALLARGS=( "$@" )
set -- $(getopt acCdfhkopqruU: -- "$@")
optstring="acCdfhkopqruU"
getopt -T >/dev/null
if [ $? -eq 4 ]; then
optstring="-o $optstring"
fi
set -- $(getopt $optstring -- "$@")
while true;
do
case "$1" in