You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bd...@apache.org on 2005/10/10 13:36:00 UTC

svn commit: r312622 - /cocoon/trunk/cocoon.sh

Author: bdelacretaz
Date: Mon Oct 10 04:35:55 2005
New Revision: 312622

URL: http://svn.apache.org/viewcvs?rev=312622&view=rev
Log:
make 'servlet' the default action

Modified:
    cocoon/trunk/cocoon.sh

Modified: cocoon/trunk/cocoon.sh
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon.sh?rev=312622&r1=312621&r2=312622&view=diff
==============================================================================
--- cocoon/trunk/cocoon.sh (original)
+++ cocoon/trunk/cocoon.sh Mon Oct 10 04:35:55 2005
@@ -55,7 +55,7 @@
     echo "Usage: $0 (action)"
     echo "actions:"
     echo "  cli               Run Cocoon from the command line"
-    echo "  servlet           Run Cocoon in a servlet container"
+    echo "  servlet           Run Cocoon in a servlet container (default)"
     echo "  servlet-admin     Run Cocoon in a servlet container and turn on container web administration"
     echo "  servlet-debug     Run Cocoon in a servlet container and turn on JVM remote debug"
     echo "  servlet-profile   Run Cocoon in a servlet container and turn on JVM profiling"
@@ -64,10 +64,16 @@
     exit 1
 }
 
-[ $# -gt 0 ] || usage
-
-ACTION=$1
-shift
+# ----- Handle action parameter ------------------------------------------------
+DEFAULT_ACTION="servlet"
+ACTION="$1"
+if [ -n "$ACTION" ]
+then
+  shift
+else
+  ACTION=$DEFAULT_ACTION
+  echo "$0: executing default action '$ACTION', use -h to see other actions"
+fi
 ARGS="$*"
 
 # ----- Verify and Set Required Environment Variables -------------------------