fix for electron app 20/161020/3
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 21 Nov 2017 04:11:43 +0000 (13:11 +0900)
committerSungsik Han <ss440.han@samsung.com>
Tue, 21 Nov 2017 08:12:53 +0000 (08:12 +0000)
Change-Id: I473726f65753790406204f840b0ac580d584e64a
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt/build/script/run_was_tizen.sh

index d20d131..042827f 100755 (executable)
@@ -9,7 +9,6 @@ export WAS_HOME=/opt/usr/home/owner/data/electron/wrt_support
 
 #MAIN,RUNTIME,WEBAPPLICATION,WEBVIEW
 export TARGET=TIZEN
-export DEBUG=*
 export WAS_EXTENSIONS_REPO=$WAS_HOME/extensions_repo
 export WAS_EXTENSIONS_PATH=$WAS_HOME/extensions
 export WAS_INSTALLER_PATH=$WAS_HOME/installer
@@ -17,5 +16,21 @@ export WAS_INSTALLER_EXT_PATH=$WAS_HOME/installer/js/extension
 export WAS_APPS_REPO=$WAS_HOME/apps_repo
 export WAS_SAMPLE_PATH=$WAS_HOME/sample
 
+# Source the optparse.bash file ---------------------------------------------------
+source $SCRIPTDIR/optparse/optparse.bash
+# Define options
+optparse.define short=a long=app desc="path" variable=path
+optparse.define short=d long=debug desc="debug mode on" variable=debug value=true default=false
+
+if [ "$debug" = "true" ]; then
+  echo "********* DEBUG MODE ON *********"
+  export DEBUG=*
+fi
+
 echo "Start launcher"
-$SCRIPTDIR/electron
+if [ -n "$path" ]; then
+  echo "PATH : " $path
+  $SCRIPTDIR/electron $path
+else
+  $SCRIPTDIR/electron
+fi