diff options
author | P. J. McDermott <pjm@nac.net> | 2013-10-23 21:44:09 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-10-23 21:44:09 (EDT) |
commit | a89832c82b00a175f7f83fcfb36153176b201065 (patch) | |
tree | b1432dcacb2a324088bb2b9bacdc249322f97163 /lib | |
parent | df5eaffb6baaf889c5fd58268bc8c6d7b5997771 (diff) |
get_options(): Handle "?" option.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getopt.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/getopt.sh b/lib/getopt.sh index 537892b..b609a1f 100644 --- a/lib/getopt.sh +++ b/lib/getopt.sh @@ -36,7 +36,9 @@ get_options() unset OPTARG while getopts "${optstring}" opt; do - eval "${prefix}${opt}=\"\${OPTARG:-true}\"" + if [ "x${opt}" != 'x?' ]; then + eval "${prefix}${opt}=\"\${OPTARG:-true}\"" + fi unset OPTARG done |