# HG changeset patch # User Giulio Moro # Date 1466454514 -3600 # Node ID 5934790c7c15e253ba89b18bae7392e18d32cdb3 # Parent 838a4a4a858085a6788a05f38046a8d73305a766 update_board forwards flags to update_IDE, IDE gets restarted only once diff -r 838a4a4a8580 -r 5934790c7c15 .cproject --- a/.cproject Mon Jun 20 21:20:28 2016 +0100 +++ b/.cproject Mon Jun 20 21:28:34 2016 +0100 @@ -134,8 +134,7 @@ - - + @@ -262,8 +261,7 @@ - - + diff -r 838a4a4a8580 -r 5934790c7c15 scripts/update_board --- a/scripts/update_board Mon Jun 20 21:20:28 2016 +0100 +++ b/scripts/update_board Mon Jun 20 21:28:34 2016 +0100 @@ -147,7 +147,7 @@ then [ -z `which sed` ] && FILTER=cat || FILTER="sed s/\\n// | sed s/^.*:/Updated\ files:\/g | tr \"\n\" \" \"" rsync -ac --no-t --delete-after --stats $FILES_TO_COPY $BBB_ADDRESS:$BBB_BELA_HOME 2>/dev/null |grep -i "Number" | grep -i "files" | grep -i "transferred" | eval $FILTER &&\ - rsync -ac --no-t libpd.so $BBB_ADDRESS:/usr/lib + printf "..." && rsync -ac --no-t libpd.so $BBB_ADDRESS:/usr/lib else # if rsync is not available, then clean the folders before copying the files ssh $BBB_ADDRESS "rm -rf $FILES_TO_COPY; mkdir -p $BBB_BELA_HOME" &&\ @@ -171,30 +171,30 @@ fi printf "Cleaning build environment..." -ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory coreclean" +ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory coreclean &>/dev/null" error_handler $? "\nError cleaning core\n" #------------- #Installing IDE [ $ALWAYS_YES -eq 0 ] && ALWAYS_YES_FLAG= || ALWAYS_YES_FLAG="-y" -ls $IDE_FOLDER/scripts/setup_IDE.sh >/dev/null 2>/dev/null +[ $FULL -eq 1 ] && NO_FRILLS_FLAG= || NO_FRILLS_FLAG="--no-frills" +ls $IDE_FOLDER/scripts/update_IDE >/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" + cd $IDE_FOLDER/scripts && ./update_IDE $ALWAYS_YES_FLAG $NO_FRILLS_FLAG + # The IDE is restarted by the update_IDE script else # run the IDE - echo "The Bela core files were updated on the board, but a valid IDE folder was not found in $IDE_FOLDER/, so the IDE was not updated. -You can get a copy of the most up-to-date IDE files from https://github.com/LBDonovan/bela-ide" - [ $FULL -eq 1 ] && ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" &&\ - echo "If there was an older version of the IDE on the board, it is being restarted." + printf "\nThe Bela core files were updated on the board, but a valid IDE folder was not found in $IDE_FOLDER/, so the IDE was not updated. +You can get a copy of the most up-to-date IDE files from https://github.com/LBDonovan/bela-ide\n" + [ $FULL -eq 1 ] && printf "If there was an older version of the IDE on the board, it is being restarted.\n\n" &&\ + ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" fi -[ $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. To control the ide use the ide.sh script" +[ $FULL -eq 1 ] && ssh $BBB_ADDRESS make -C $BBB_BELA_HOME --no-print-directory idestartup nostartup && printf "The board will now run the IDE at startup, but startup of the Bela program has been disabled.\nTo enable it, use the set_startup.sh script.\nTo control the ide use the ide.sh script\n" [ $ALWAYS_YES -eq 1 ] && printf "\nSetup complete.\n\n" || { - printf '\nSetup complete, press any key to continue\n\n' + printf '\nSetup complete, press any key to continue . . .\n\n' read }