--- /dev/null
+#!/bin/sh
+
+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"
+
+escapeSpace() {
+ printf "%s" "$1"|sed 's/ /\\ /g'
+}
+
#!/bin/sh
-MAIN=org.tizen.cli.exec.debug.Main
+export MAIN=org.tizen.cli.exec.debug.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.gen.Main
+export MAIN=org.tizen.cli.exec.gen.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.install.Main
+export MAIN=org.tizen.cli.exec.install.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.query.Main
+export MAIN=org.tizen.cli.exec.query.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.wgt.Main
+export 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
+ 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"
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-OPT_TRACE=
+. $DIR_BIN/common.sh
-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
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
done
-OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME"
-ARGS=`echo "$@"`
EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.run.Main
+export MAIN=org.tizen.cli.exec.run.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.sign.Main
+export 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
+ ls=`ls -ld "$SCRIPT"`
+
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
done
-CLASSPATH=$DIR_CONFIG:$JAR
-
-OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
-OPT_PRG_NAME="-Dcli.name=$SCRIPT"
-OPT_CLI_HOME="-Dcli.home=$DIR_HOME"
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-READ_ARG="n"
+. $DIR_BIN/common.sh
-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
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
done
-OPT="$OPT_TRACE $OPT_LOGGING $OPT_PRG_NAME $OPT_CLI_HOME"
-
-EXEC="java -cp $CLASSPATH $OPT $MAIN $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
#!/bin/sh
-MAIN=org.tizen.cli.exec.uninstall.Main
+export MAIN=org.tizen.cli.exec.uninstall.Main
SCRIPT="$0"
fi
done
-DIR_BIN=`dirname $SCRIPT`
-DIR_HOME=$DIR_BIN/..
-DIR_LIB=$DIR_HOME/lib
-DIR_CONFIG=$DIR_HOME/conf
+export DIR_BIN=`dirname $SCRIPT`
+export DIR_HOME=$DIR_BIN/..
-JARS=`find $DIR_LIB -name "*.jar"`
+. $DIR_BIN/common.sh
-JAR=""
-for JAR_FILE in $JARS; do
- JAR=$JAR:$JAR_FILE
+for ARG in "$@" ; do
+ ARGS="$ARGS $(escapeSpace $ARG)"
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 $@"
+EXEC="java -cp $CLASSPATH $OPT $MAIN $ARGS"
if [ -n "$OPT_TRACE" ]
then
echo "Command :$EXEC"
fi
-$EXEC
+eval "$EXEC"
\ No newline at end of file
}
catch ( final ParseException e )
{
- logger.trace( "Invalid usage" );
- printHelp();
- logger.debug( "Help argument :{}", cmd.getArgList() );
+ logger.error( "Parsing Error :", e );
+ logger.trace( "Invalid usage" );
+ printHelp();
- for ( String keyword : cmd.getArgs() )
- {
- printHelpDetail( keyword );
- }
+ if ( null != cmd ) {
+ logger.debug( "Help argument :{}", cmd.getArgList() );
+
+ for ( String keyword : cmd.getArgs() )
+ {
+ printHelpDetail( keyword );
+ }
+
+ }
}
catch ( final Exception e )
{