From a89832c82b00a175f7f83fcfb36153176b201065 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 23 Oct 2013 21:44:09 -0400 Subject: get_options(): Handle "?" option. --- (limited to 'lib/getopt.sh') 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 -- cgit v0.9.1