Index: scripts/start.sh =================================================================== diff -u -rccddb9de7bc94036e130e034b1de67dca00e028d -r2d38e1a292732115e5884919d3dd7ae7152fa0ad --- scripts/start.sh (.../start.sh) (revision ccddb9de7bc94036e130e034b1de67dca00e028d) +++ scripts/start.sh (.../start.sh) (revision 2d38e1a292732115e5884919d3dd7ae7152fa0ad) @@ -20,10 +20,16 @@ source ./globals.sh +DEMO_SETUP=0 +DEMO_SWITCH="-D" +if [ "$2" == $DEMO_SWITCH ]; then + DEMO_SETUP=1 +fi + function displayHelp() { if [ "$1" = "-h" -o "$1" = "--help" ]; then echo -e "-h \t This help" - echo "usage start.sh [ [xxx] or [xxx.xxx.xxx.xxx] or [] ]" + echo "usage start.sh [ [xxx] or [xxx.xxx.xxx.xxx] ]" exit 0 fi } @@ -86,7 +92,7 @@ } function sshRun() { - ssh $SSH_PARAM $DST_USER@$DST_IP $1 + ssh $SSH_PARAM $DST_USER@$DST_IP $1:: return $? } @@ -230,6 +236,17 @@ copyFileTo $DENALI_BIN $DST_PATH_HOME } +function setupDemoMode() { + if [ $DEMO_SETUP != 0 ]; then return fi + echo_dash_comment + echo_dash_message "Installing Dry-Demo" | tee -a $LOG_OUT_FILE + echo_dash_comment + sshRun "killall python3" + sshRun "rm -frd $DST_PATH_DRYDEMO;" + sshRun "mkdir -p $DST_PATH_DRYDEMO;" + copyFolderTo $SRC_PATH_DRYDEMO $DST_PATH_DRYDEMO +} + function connect() { echo_dash_comment echo_dash_message "please ssh into device $DST_IP and run ./setup.sh" @@ -266,6 +283,7 @@ setupCloudSync setupFonts setupApplication + setupDemoMode } # running the main function