Mercurial > hg > beaglert
changeset 477:5934790c7c15 prerelease
update_board forwards flags to update_IDE, IDE gets restarted only once
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 20 Jun 2016 21:28:34 +0100 |
parents | 838a4a4a8580 |
children | cb875406a594 |
files | .cproject scripts/update_board |
diffstat | 2 files changed, 14 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/.cproject Mon Jun 20 21:20:28 2016 +0100 +++ b/.cproject Mon Jun 20 21:28:34 2016 +0100 @@ -134,8 +134,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="default_main.cpp|audio_routines_old.S" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="core"/> - <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="examples/basic"/> + <entry excluding="audio_routines_old.S" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="core"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="projects/basic_button"/> </sourceEntries> @@ -262,8 +261,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="default_main.cpp|audio_routines_old.S" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="core"/> - <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="examples/basic"/> + <entry excluding="audio_routines_old.S" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="core"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/> <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="projects/basic_button"/> </sourceEntries>
--- 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 }