[Title] Fixed bug in common.bat 75/10575/1
authorTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 7 Oct 2013 07:21:02 +0000 (16:21 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 7 Oct 2013 07:21:02 +0000 (16:21 +0900)
[Desc.]
[Issue]

Change-Id: I444aae797bc415390900f524d0e6a817a9d7dd91
Signed-off-by: Taeyoung Son <taeyoung2.son@samsung.com>
org.tizen.cli/doc/install/bin_/common.bat

index b42318c..8c36153 100755 (executable)
-@echo off\r
-set CLI_HOME=%1\r
-set CLI_NAME=%2\r
-set MAIN=%3\r
-set ARGS=%4\r
-\r
-set OPT_LOGGING=-Dlog4j.configuration=log4j.xml\r
-set OPT_PRG_NAME=-Dcli.name=%CLI_NAME%\r
-set LIB_PATH=%CLI_HOME%\lib\r
-\r
-set classpath=\r
-FOR /f "tokens=*" %%i IN ('dir %LIB_PATH% /B') DO ( call:CONCAT %LIB_PATH%\%%i )\r
-\r
-set READ_ARG="n"\r
-\r
-FOR %%W IN ( %* ) DO ( call:parseArg %%W )\r
-\r
-set OPT=%OPT_TRACE% %OPT_LOGGING% %OPT_PRG_NAME%\r
-set EXEC=java -cp %CLI_HOME%\conf;%classpath% %OPT% %MAIN% %ARGS%\r
-\r
-IF NOT "" == "%OPT_TRACE%" ( echo Command :%EXEC% )\r
-\r
-%EXEC%\r
-goto:eof\r
-\r
-:parseArg\r
-        IF "y" == %READ_ARG% goto SET_LOGGING\r
-\r
-:SECOND_STEP\r
-    IF "%~1" == "--log" goto SET_READY\r
-    IF "%~1" == "-l" goto SET_READY\r
-:END_STEP\r
-goto:eof\r
-\r
-:SET_LOGGING\r
-    set OPT_LOGGING=-Dlog4j.configuration=log4j-%~1.xml\r
-    IF "%~1" == "trace" set OPT_TRACE=-Dlog4j.debug=true\r
-    set READ_ARG="n"\r
-\r
-    goto SECOND_STEP\r
-\r
-:SET_READY\r
-    set READ_ARG="y"\r
-    goto END_STEP\r
-\r
-:CONCAT\r
-    set classpath=%classpath%%1;\r
+@echo off
+set CLI_HOME=%1
+SHIFT
+set SCRIPT=%1
+SHIFT
+set MAIN=%1
+SHIFT
+set ARGS=
+:LOOP
+if "%1"=="" goto AFTER_LOOP
+set ARGS=%ARGS% %1
+SHIFT
+goto LOOP
+:AFTER_LOOP
+
+
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+set LIB_PATH=%CLI_HOME%\lib
+
+set classpath=
+FOR /f "tokens=*" %%i IN ('dir %LIB_PATH% /B') DO ( call:CONCAT %LIB_PATH%\%%i )
+
+set READ_ARG="n"
+
+FOR %%W IN ( %* ) DO ( call:parseArg %%W )
+
+set OPT=%OPT_TRACE% %OPT_LOGGING% %OPT_PRG_NAME%
+set EXEC=java -cp %CLI_HOME%\conf;%classpath% %OPT% %MAIN% %ARGS%
+@echo off
+set CLI_HOME=%1
+SHIFT
+set SCRIPT=%1
+SHIFT
+set MAIN=%1
+SHIFT
+set ARGS=
+:LOOP
+if "%1"=="" goto AFTER_LOOP
+set ARGS=%ARGS% %1
+SHIFT
+goto LOOP
+:AFTER_LOOP
+
+
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+set LIB_PATH=%CLI_HOME%\lib
+
+set classpath=
+FOR /f "tokens=*" %%i IN ('dir %LIB_PATH% /B') DO ( call:CONCAT %LIB_PATH%\%%i )
+
+set READ_ARG="n"
+
+FOR %%W IN ( %* ) DO ( call:parseArg %%W )
+
+set OPT=%OPT_TRACE% %OPT_LOGGING% %OPT_PRG_NAME%
+set EXEC=java -cp %CLI_HOME%\conf;%classpath% %OPT% %MAIN% %ARGS%
+
+IF NOT "" == "%OPT_TRACE%" ( echo Command :%EXEC% )
+
+%EXEC%
+goto:eof
+
+:parseArg
+        IF "y" == %READ_ARG% goto SET_LOGGING
+
+:SECOND_STEP
+    IF "%~1" == "--log" goto SET_READY
+    IF "%~1" == "-l" goto SET_READY
+:END_STEP
+goto:eof
+
+:SET_LOGGING
+    set OPT_LOGGING=-Dlog4j.configuration=log4j-%~1.xml
+    IF "%~1" == "trace" set OPT_TRACE=-Dlog4j.debug=true
+    set READ_ARG="n"
+
+    goto SECOND_STEP
+
+:SET_READY
+    set READ_ARG="y"
+    goto END_STEP
+
+:CONCAT
+    set classpath=%classpath%%1;
+
+IF NOT "" == "%OPT_TRACE%" ( echo Command :%EXEC% )
+
+%EXEC%
+goto:eof
+
+:parseArg
+        IF "y" == %READ_ARG% goto SET_LOGGING
+
+:SECOND_STEP
+    IF "%~1" == "--log" goto SET_READY
+    IF "%~1" == "-l" goto SET_READY
+:END_STEP
+goto:eof
+
+:SET_LOGGING
+    set OPT_LOGGING=-Dlog4j.configuration=log4j-%~1.xml
+    IF "%~1" == "trace" set OPT_TRACE=-Dlog4j.debug=true
+    set READ_ARG="n"
+
+    goto SECOND_STEP
+
+:SET_READY
+    set READ_ARG="y"
+    goto END_STEP
+
+:CONCAT
+    set classpath=%classpath%%1;
+