summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNoah Slater <nslater@apache.org>2008-06-16 11:00:59 +0000
committerNoah Slater <nslater@apache.org>2008-06-16 11:00:59 +0000
commit93bd2f4b1cecd4bd8120df060ba4b6c685f453fd (patch)
treeb77f542f54ea9afd14df6e2b078c929fa01f44bd /bin
parent21114b9e7fff7a5e80ee289fa95078ec6bd365b3 (diff)
corrected getopt usage
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@668109 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'bin')
-rw-r--r--bin/couchdb.tpl.in7
-rw-r--r--bin/couchjs.tpl.in7
2 files changed, 10 insertions, 4 deletions
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 00e6d3a1..290d1ec3 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -305,10 +305,13 @@ stop_couchdb () {
parse_script_option_list () {
# Parse the script option list and take the appropriate action.
- if test ! argument_list=`getopt hVc:ibp:r:Ro:e:skd $@`; then
+ set +e
+ options=`getopt hVc:ibp:r:Ro:e:skd $@`
+ 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;;
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;;