synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject svn commit: r566928 - /webservices/synapse/trunk/java/src/main/bin/synapse.sh
Date Fri, 17 Aug 2007 06:03:44 GMT
Author: ruwan
Date: Thu Aug 16 23:03:43 2007
New Revision: 566928

URL: http://svn.apache.org/viewvc?view=rev&rev=566928
Log:
Applying the Upul's patch fro the shel script
https://issues.apache.org/jira/browse/SYNAPSE-120

Modified:
    webservices/synapse/trunk/java/src/main/bin/synapse.sh

Modified: webservices/synapse/trunk/java/src/main/bin/synapse.sh
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/main/bin/synapse.sh?view=diff&rev=566928&r1=566927&r2=566928
==============================================================================
--- webservices/synapse/trunk/java/src/main/bin/synapse.sh (original)
+++ webservices/synapse/trunk/java/src/main/bin/synapse.sh Thu Aug 16 23:03:43 2007
@@ -123,26 +123,39 @@
 # synapse.xml
 SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/repository/conf/synapse.xml
 
+PORT="-Dport=8080"
+
+while [ $# -ge 1 ]; do
+
 if [ "$1" = "-xdebug" ]; then
-  XDEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-fi
+    XDEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+    shift
 
-if [ "$1" = "-sample" ]; then
-  SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/repository/conf/sample/synapse_sample_$2.xml
-fi
-
-if [ "$3" = "-xdebug" ]; then
-  XDEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-fi
-
-if [ "$3" = "-sample" ]; then
-  SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/repository/conf/sample/synapse_sample_$4.xml
-fi
+  elif [ "$1" = "-sample" ]; then
+    SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/repository/conf/sample/synapse_sample_$2.xml
+    shift 2 # -sample and sample number
 
-PORT="-Dport=8080"
-if [ "$1" = "-port" ]; then
-  PORT="-Dport=$2"
-fi
+  elif [ "$1" = "-port" ]; then
+    PORT="-Dport=$2"
+    shift 2 # -port and port number
+
+elif [ "$1" = "-h" ]; then
+    echo "Usage: synapse.sh ( commands ... )"
+    echo "commands:"
+    echo "  -xdebug           Start Synapse under JPDA debugger"
+    echo "  -sample (number)  Start with sample Synapse configuration of given number"
+    echo "  -port (number)    Listen in HTTP port with given number (default:8080)"
+    shift
+    exit 0
+
+  else
+    echo "Error: unknown command:$1"
+    echo "For help: synapse.sh -h"
+    shift
+    exit 1
+  fi
+
+done
 
 # ----- Execute The Requested Command -----------------------------------------
 



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message