summaryrefslogtreecommitdiff
path: root/bin/couchjs.tpl.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/couchjs.tpl.in')
-rw-r--r--bin/couchjs.tpl.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/couchjs.tpl.in b/bin/couchjs.tpl.in
index af5399a2..8b970756 100644
--- a/bin/couchjs.tpl.in
+++ b/bin/couchjs.tpl.in
@@ -79,10 +79,13 @@ run_couchjs () {
parse_script_option_list () {
# Parse the script option list and take the appropriate action.
- if test ! argument_list=`getopt hV $@`; then
+ set +e
+ options=`getopt hV $@`
+ if test ! $? -eq 0; then
display_error
fi
- eval set -- "$argument_list"
+ set -e
+ eval set -- "$options"
while [ $# -gt 0 ]; do
case "$1" in
-h) shift; display_help; exit $SCRIPT_OK;;