summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-02 21:58:55 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-02 21:58:55 (EDT)
commit848e033666ea63158ad1b8c95a7f1458317530b2 (patch)
treed7a4a2ef8cfa640298ea7481c127944807f0ff52 /lib
parent72d46f94ecd6e60218424d8f29a27574234aff85 (diff)
get_options(): Return 1 on illegal option
Diffstat (limited to 'lib')
-rw-r--r--lib/getopt.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/getopt.sh b/lib/getopt.sh
index 645e77f..32fb57d 100644
--- a/lib/getopt.sh
+++ b/lib/getopt.sh
@@ -39,6 +39,8 @@ get_options()
while getopts "${optstring}" opt; do
if [ "x${opt}" != 'x?' ]; then
eval "${prefix}${opt}=\"\${OPTARG:-true}\""
+ else
+ return 1
fi
unset OPTARG
done