Author: supun
Date: Sun Jun  7 23:12:09 2009
New Revision: 38091
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=38091

Log:
Fixing the batch file

Modified:
   trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat

Modified: trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat
URL: 
http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat?rev=38091&r1=38090&r2=38091&view=diff
==============================================================================
--- trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat 
(original)
+++ trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat Sun Jun 
 7 23:12:09 2009
@@ -35,13 +35,16 @@
 
 :initial
 if "%1"=="-sn" goto sname
-if "%1"=="" goto run
+if "%1"=="" goto no_sample
 shift
 goto initial
 
 :sname
 shift
 set cn=%1
+if "%1"=="" goto invalid_number
+SET /A UserInputVal="%cn%"*1
+IF %UserInputVal% EQU 0 GOTO invalid_number
 goto run
 
 :lreturn
@@ -50,4 +53,16 @@
 
 :run
 wso2server.bat %CMD% -Desb.sample=%cn% 
-Dcarbon.registry.root=/esb-samples/s%cn%
+goto done
 
+:invalid_number
+echo "*** Specified sample number is not a number *** Please specify a valid 
sample number with the -sn option"
+echo "Example, to run sample 0: wso2esb-samples.sh -sn 0"
+goto done
+
+:no_sample
+echo "*** Sample number to be started is not specified *** Please specify a 
sample number to be started with the -sn option"
+echo "Example, to run sample 0: wso2esb-samples.sh -sn 0"
+goto done
+
+:done
\ No newline at end of file

_______________________________________________
Esb-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to