Mercurial > hg > beaglert
changeset 454:1d66b4e8ced9 prerelease
--no-frills for udpate_board
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 19 Jun 2016 23:20:34 +0100 |
parents | 4cccb13bf406 |
children | 0567af952cfa |
files | scripts/update_board |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/update_board Sun Jun 19 22:36:38 2016 +0100 +++ b/scripts/update_board Sun Jun 19 23:20:34 2016 +0100 @@ -92,10 +92,11 @@ SCRIPTDIR=$(dirname "$0") [ -z "$IDE_FOLDER" ] && IDE_FOLDER=$SCRIPTDIR/../../bela-ide/ +# Check if destination folder exists +# the StrictHostKeyChecking no should prevent the unkown host prompt +ssh -o "StrictHostKeyChecking no" $BBB_ADDRESS stat $BBB_BELA_HOME &>/dev/null && DESTINATION_EMPTY=0 || DESTINATION_EMPTY=1 # Set the date on the board [ $FULL -eq 1 ] && set_date -# Check if destination folder exists -ssh $BBB_ADDRESS stat $BBB_BELA_HOME &>/dev/null && DESTINATION_EMPTY=0 || DESTINATION_EMPTY=1 if [ $DESTINATION_EMPTY -eq 0 ]; then @@ -119,9 +120,12 @@ echo "Updating Bela core files to remote folder $BBB_BELA_HOME" # Stop Bela if running and remove all files -printf "Stopping Bela..." -ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME idestop stop &>/dev/null; screen -X -S Bela quit &>/dev/null; screen -X -S IDE-Bela quit &>/dev/null; true"; -error_handler $? +if [ $FULL -eq 1 ] +then + printf "Stopping Bela..." + ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME idestop stop &>/dev/null; screen -X -S Bela quit &>/dev/null; screen -X -S IDE-Bela quit &>/dev/null; true"; + error_handler $? +fi if [ $RESET_BOARD -eq 1 ]; then @@ -172,6 +176,7 @@ ls $IDE_FOLDER/scripts/setup_IDE.sh >/dev/null 2>/dev/null if [ $? -eq 0 ] then + export BBB_ADDRESS BBB_BELA_HOME cd $IDE_FOLDER/scripts && ./setup_IDE.sh $ALWAYS_YES_FLAG # run the IDE [ $FULL -eq 1 ] && ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" @@ -183,7 +188,7 @@ " fi -ssh $BBB_ADDRESS make -C $BBB_BELA_HOME --no-print-directory idestartup nostartup && echo "The board will now run the IDE at startup, but startup of the Bela program has been disabled. To enable it, use the set_startup.sh script" +[ $FULL -eq 1 ] && ssh $BBB_ADDRESS make -C $BBB_BELA_HOME --no-print-directory idestartup nostartup && echo "The board will now run the IDE at startup, but startup of the Bela program has been disabled. To enable it, use the set_startup.sh script" [ $ALWAYS_YES -eq 1 ] && printf "\nSetup complete.\n\n" || { printf '\nSetup complete, press any key to continue\n\n'