From 7966a9fa56b2d9b2777ad50cbb572197726df554 Mon Sep 17 00:00:00 2001 From: "Bonyong.lee" Date: Wed, 4 Jul 2012 12:09:58 +0100 Subject: [PATCH] [Title] Add and modify directory structure [Type] Bugfix [Module] Sub [Priority] Minor [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- org.tizen.cli/doc/install/bin_/sign | 65 +++++++++++++++++++++++++++++++++ org.tizen.cli/doc/install/bin_/sign.bat | 45 +++++++++++++++++++++++ org.tizen.cli/doc/install/bin_/wgt | 65 +++++++++++++++++++++++++++++++++ org.tizen.cli/doc/install/bin_/wgt.bat | 45 +++++++++++++++++++++++ 4 files changed, 220 insertions(+) create mode 100644 org.tizen.cli/doc/install/bin_/sign create mode 100644 org.tizen.cli/doc/install/bin_/sign.bat create mode 100644 org.tizen.cli/doc/install/bin_/wgt create mode 100644 org.tizen.cli/doc/install/bin_/wgt.bat diff --git a/org.tizen.cli/doc/install/bin_/sign b/org.tizen.cli/doc/install/bin_/sign new file mode 100644 index 0000000..0563925 --- /dev/null +++ b/org.tizen.cli/doc/install/bin_/sign @@ -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_/sign.bat b/org.tizen.cli/doc/install/bin_/sign.bat new file mode 100644 index 0000000..94be6a3 --- /dev/null +++ b/org.tizen.cli/doc/install/bin_/sign.bat @@ -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_/wgt b/org.tizen.cli/doc/install/bin_/wgt new file mode 100644 index 0000000..93b141f --- /dev/null +++ b/org.tizen.cli/doc/install/bin_/wgt @@ -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_/wgt.bat b/org.tizen.cli/doc/install/bin_/wgt.bat new file mode 100644 index 0000000..824a451 --- /dev/null +++ b/org.tizen.cli/doc/install/bin_/wgt.bat @@ -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 + -- 2.7.4