[Title] Fixed rename CLI command script
authorgyeongseok.seo <gyeongseok.seo@samsung.com>
Thu, 19 Jul 2012 04:22:48 +0000 (13:22 +0900)
committergyeongseok.seo <gyeongseok.seo@samsung.com>
Thu, 19 Jul 2012 04:22:48 +0000 (13:22 +0900)
[Type] Enhancement
[Module] cli
[Priority] Major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Iffed73d3faf0b13864033dadcea04997af5b95c4

15 files changed:
org.tizen.cli/doc/install/bin_/signing [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/signing.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-debug [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-debug.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-install [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-install.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-packaging [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-packaging.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-query [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-query.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-run [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-run.bat [new file with mode: 0644]
org.tizen.cli/doc/install/bin_/web-uninstall [new file with mode: 0755]
org.tizen.cli/doc/install/bin_/web-uninstall.bat [new file with mode: 0644]
package/build.linux

diff --git a/org.tizen.cli/doc/install/bin_/signing b/org.tizen.cli/doc/install/bin_/signing
new file mode 100755 (executable)
index 0000000..0563925
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.sign.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+       ls=`ls -ld "$SCRIPT"`
+
+       link=`expr "$ls" : '.*-> \(.*\)$'`
+       if expr "$link" : '/.*' > /dev/null; then
+               SCRIPT="$link"
+       else
+               SCRIPT=`dirname "$SCRIPT"`/"$link"
+       fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+       JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/signing.bat b/org.tizen.cli/doc/install/bin_/signing.bat
new file mode 100644 (file)
index 0000000..94be6a3
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.sign.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-debug b/org.tizen.cli/doc/install/bin_/web-debug
new file mode 100755 (executable)
index 0000000..ebc2645
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.debug.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT=`dirname "$SCRIPT"`/"$link"
+    fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+    JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-debug.bat b/org.tizen.cli/doc/install/bin_/web-debug.bat
new file mode 100644 (file)
index 0000000..15466d0
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.debug.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-install b/org.tizen.cli/doc/install/bin_/web-install
new file mode 100755 (executable)
index 0000000..4939e32
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.install.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT=`dirname "$SCRIPT"`/"$link"
+    fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+    JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-install.bat b/org.tizen.cli/doc/install/bin_/web-install.bat
new file mode 100644 (file)
index 0000000..c600b21
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.install.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-packaging b/org.tizen.cli/doc/install/bin_/web-packaging
new file mode 100755 (executable)
index 0000000..93b141f
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.wgt.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+       ls=`ls -ld "$SCRIPT"`
+
+       link=`expr "$ls" : '.*-> \(.*\)$'`
+       if expr "$link" : '/.*' > /dev/null; then
+               SCRIPT="$link"
+       else
+               SCRIPT=`dirname "$SCRIPT"`/"$link"
+       fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+       JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+ARGS=`echo "$@"`
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-packaging.bat b/org.tizen.cli/doc/install/bin_/web-packaging.bat
new file mode 100644 (file)
index 0000000..824a451
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.wgt.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-query b/org.tizen.cli/doc/install/bin_/web-query
new file mode 100755 (executable)
index 0000000..6f16928
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.query.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT=`dirname "$SCRIPT"`/"$link"
+    fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+    JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-query.bat b/org.tizen.cli/doc/install/bin_/web-query.bat
new file mode 100644 (file)
index 0000000..c2ba7b5
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.query.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-run b/org.tizen.cli/doc/install/bin_/web-run
new file mode 100755 (executable)
index 0000000..a76202a
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.run.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT=`dirname "$SCRIPT"`/"$link"
+    fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+    JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-run.bat b/org.tizen.cli/doc/install/bin_/web-run.bat
new file mode 100644 (file)
index 0000000..9751380
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.run.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
diff --git a/org.tizen.cli/doc/install/bin_/web-uninstall b/org.tizen.cli/doc/install/bin_/web-uninstall
new file mode 100755 (executable)
index 0000000..9644f74
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+MAIN=org.tizen.cli.exec.uninstall.Main
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT=`dirname "$SCRIPT"`/"$link"
+    fi
+done
+
+DIR_BIN=`dirname $SCRIPT`
+DIR_HOME=$DIR_BIN/..
+DIR_LIB=$DIR_HOME/lib
+DIR_CONFIG=$DIR_HOME/conf
+
+JARS=`find $DIR_LIB -name "*.jar"`
+
+JAR=""
+for JAR_FILE in $JARS; do
+    JAR=$JAR:$JAR_FILE
+done
+
+CLASSPATH=$DIR_CONFIG:$JAR
+
+OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
+OPT_PRG_NAME="-Dcli.name=$SCRIPT"
+
+READ_ARG="n"
+
+OPT_TRACE=
+
+for WORD in $@; do
+        if [ "y" = "$READ_ARG" ]
+        then
+                OPT_LOGGING="-Dlog4j.configuration=log4j-${WORD}.xml"
+                if [ "$WORD" = "trace" ]
+                then
+                        OPT_TRACE="-Dlog4j.debug=true"
+                fi
+                READ_ARG="n"
+        fi
+        case $WORD in
+        "--log" | "-l" )
+        READ_ARG="y"
+        ;;
+        esac
+done
+
+OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
+
+EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+
+if [ -n "$OPT_TRACE" ]
+then
+        echo "Command :$EXEC"
+fi
+
+$EXEC
diff --git a/org.tizen.cli/doc/install/bin_/web-uninstall.bat b/org.tizen.cli/doc/install/bin_/web-uninstall.bat
new file mode 100644 (file)
index 0000000..7410b14
--- /dev/null
@@ -0,0 +1,45 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space          
+set KEY=TIZEN_SDK_INSTALLED_PATH
+FOR /f "tokens=1,2 delims==" %%i IN (%localappdata%\.TizenSDK\tizensdkpath) DO if %%i==%KEY% (set SDK_PATH=%%j)
+set CLI_HOME=%SDK_PATH%\SDK\dev_tools
+set MAIN=org.tizen.cli.exec.uninstall.Main
+
+set OPT_TRACE=
+set OPT_LOGGING=-Dlog4j.configuration=log4j.xml
+set OPT_PRG_NAME=-Dcli.name=%SCRIPT%
+
+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 -Djava.ext.dirs=%CLI_HOME%\lib %OPT% %MAIN% %*
+
+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
+
index 0a3ab43..e06ea00 100755 (executable)
@@ -54,7 +54,7 @@ build()
 # install
 install() 
 {
-       mkdir -p $TARGET
+       mkdir -p $TARGET/lib
        cp -r $PROJECT_HOME/doc/install/bin_ $TARGET/bin
        cp -r $LIB/* $TARGET/lib
        cp dist/*.jar $TARGET/lib