Mercurial > hg > beaglert
changeset 484:afbc8f973bb3 prerelease
update_board can skip updating the IDE
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 15:16:55 +0100 |
parents | dbc76783db2a |
children | 506a319c08cf |
files | scripts/update_board |
diffstat | 1 files changed, 23 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/update_board Tue Jun 21 14:28:17 2016 +0100 +++ b/scripts/update_board Tue Jun 21 15:16:55 2016 +0100 @@ -38,6 +38,7 @@ -b arg : allows to set the path to the Bela folder on the remote end. Use quotes if you use the \"~\" symbol (default: $BBB_BELA_HOME) --clean : removes all the files in the $BBB_BELA_HOME folder, INCLUDING any source code you may have in the $BBB_BELA_HOME/projects/ subdirectory. -d : skips re-generating Doxygen documentation on the board. + -n : do not try to update the IDE. --no-frills : skips some optional commands. -y : does not prompt the user before deleting the remote files. " @@ -60,6 +61,7 @@ ALWAYS_YES=0 RESET_BOARD=0 DOXYGEN=1 +UPDATE_IDE=1 while [ "$1" != "" ]; do case $1 in -b) @@ -76,6 +78,9 @@ -d) DOXYGEN=0 ;; + -n) + UPDATE_IDE=0 + ;; --no-frills) FULL=0 ;; @@ -176,22 +181,27 @@ #------------- #Installing IDE -[ $ALWAYS_YES -eq 0 ] && ALWAYS_YES_FLAG= || ALWAYS_YES_FLAG="-y" -[ $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 ] + +if [ $UPDATE_IDE -eq 1 ] then - export BBB_ADDRESS BBB_BELA_HOME - cd $IDE_FOLDER/scripts && ./update_IDE $ALWAYS_YES_FLAG $NO_FRILLS_FLAG - # The IDE is restarted by the update_IDE script + [ $ALWAYS_YES -eq 0 ] && ALWAYS_YES_FLAG= || ALWAYS_YES_FLAG="-y" + [ $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 && ./update_IDE $ALWAYS_YES_FLAG $NO_FRILLS_FLAG + # The IDE is restarted by the update_IDE script + else + # run the IDE + 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 else - # run the IDE - 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" + echo "Not updating the IDE" fi - [ $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" || {