# HG changeset patch # User Giulio Moro # Date 1466081688 -3600 # Node ID 669855b8461bd67f3d39566692c261c76b2a0610 # Parent 4fb06ca94e021b1211037089b7b7c3fb43a9fd23 update_board.sh now correctly resolves relative paths to the $IDE_FOLDER diff -r 4fb06ca94e02 -r 669855b8461b scripts/update_board.sh --- a/scripts/update_board.sh Thu Jun 16 03:42:10 2016 +0100 +++ b/scripts/update_board.sh Thu Jun 16 13:54:48 2016 +0100 @@ -98,7 +98,7 @@ echo "Installing Bela core code in $BBB_ADDRESS:$BBB_BELA_HOME" fi -echo "Updating Bela core files to remote folder $BBB_BELA_HOME" +echo "Updating Bela cores 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"; @@ -114,7 +114,10 @@ #Check if rsync is available [ -z `which rsync` ] && RSYNC_AVAILABLE=0 || RSYNC_AVAILABLE=1 +# cd to the home of the project to make the following lines less verbose +RUN_FOLDER=`pwd` cd $SCRIPTDIR/../ + printf "Updating files..." # Copy relevant files to BeagleBone Black if [ $RSYNC_AVAILABLE -eq 1 ]; @@ -129,6 +132,8 @@ scp -q libpd.so $BBB_ADDRESS:/usr/lib fi error_handler $? +# cd back to the original folder. +cd "$RUN_FOLDER" # Create remaining directories needed for building printf "Creating directory structure on BeagleBone..." @@ -144,14 +149,13 @@ stat $IDE_FOLDER/scripts/setup_IDE.sh &> /dev/null if [ $? -eq 0 ] then - cd $IDE_FOLDER/scripts; - ./setup_IDE.sh -y + cd $IDE_FOLDER/scripts && ./setup_IDE.sh -y # run the IDE ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" else # run the IDE ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" echo \ -"Bela was installed on the board, but the IDE files were not found, so the IDE was not installed. If there was an older version of the IDE on the board, it is being restarted. +"Bela was installed on the board, but a valid IDE folder was not found in $IDE_FOLDER/, so the IDE was not updated. If there was an older version of the IDE on the board, it is being restarted. You can get a copy of the most up-to-date IDE files from https://github.com/LBDonovan/bela-ide" fi