couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject svn commit: r668109 - in /incubator/couchdb/trunk/bin: couchdb.tpl.in couchjs.tpl.in
Date Mon, 16 Jun 2008 11:01:00 GMT
Author: nslater
Date: Mon Jun 16 04:00:59 2008
New Revision: 668109

URL: http://svn.apache.org/viewvc?rev=668109&view=rev
Log:
corrected getopt usage

Modified:
    incubator/couchdb/trunk/bin/couchdb.tpl.in
    incubator/couchdb/trunk/bin/couchjs.tpl.in

Modified: incubator/couchdb/trunk/bin/couchdb.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/bin/couchdb.tpl.in?rev=668109&r1=668108&r2=668109&view=diff
==============================================================================
--- incubator/couchdb/trunk/bin/couchdb.tpl.in (original)
+++ incubator/couchdb/trunk/bin/couchdb.tpl.in Mon Jun 16 04:00:59 2008
@@ -305,10 +305,13 @@
 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;;

Modified: incubator/couchdb/trunk/bin/couchjs.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/bin/couchjs.tpl.in?rev=668109&r1=668108&r2=668109&view=diff
==============================================================================
--- incubator/couchdb/trunk/bin/couchjs.tpl.in (original)
+++ incubator/couchdb/trunk/bin/couchjs.tpl.in Mon Jun 16 04:00:59 2008
@@ -79,10 +79,13 @@
 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;;



Mime
View raw message