Mercurial > hg > beaglert
comparison scripts/update_board @ 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 | 898d57ac58a5 |
children | afbc8f973bb3 |
comparison
equal
deleted
inserted
replaced
476:838a4a4a8580 | 477:5934790c7c15 |
---|---|
145 # Copy relevant files to BeagleBone Black | 145 # Copy relevant files to BeagleBone Black |
146 if [ $RSYNC_AVAILABLE -eq 1 ]; | 146 if [ $RSYNC_AVAILABLE -eq 1 ]; |
147 then | 147 then |
148 [ -z `which sed` ] && FILTER=cat || FILTER="sed s/\\n// | sed s/^.*:/Updated\ files:\/g | tr \"\n\" \" \"" | 148 [ -z `which sed` ] && FILTER=cat || FILTER="sed s/\\n// | sed s/^.*:/Updated\ files:\/g | tr \"\n\" \" \"" |
149 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 &&\ | 149 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 &&\ |
150 rsync -ac --no-t libpd.so $BBB_ADDRESS:/usr/lib | 150 printf "..." && rsync -ac --no-t libpd.so $BBB_ADDRESS:/usr/lib |
151 else | 151 else |
152 # if rsync is not available, then clean the folders before copying the files | 152 # if rsync is not available, then clean the folders before copying the files |
153 ssh $BBB_ADDRESS "rm -rf $FILES_TO_COPY; mkdir -p $BBB_BELA_HOME" &&\ | 153 ssh $BBB_ADDRESS "rm -rf $FILES_TO_COPY; mkdir -p $BBB_BELA_HOME" &&\ |
154 scp -r -q $FILES_TO_COPY $BBB_ADDRESS:$BBB_BELA_HOME &&\ | 154 scp -r -q $FILES_TO_COPY $BBB_ADDRESS:$BBB_BELA_HOME &&\ |
155 scp -q libpd.so $BBB_ADDRESS:/usr/lib | 155 scp -q libpd.so $BBB_ADDRESS:/usr/lib |
169 ssh $BBB_ADDRESS "cd $BBB_BELA_HOME; doxygen &> /dev/null" | 169 ssh $BBB_ADDRESS "cd $BBB_BELA_HOME; doxygen &> /dev/null" |
170 error_handler $? "\nError while generating Doxygen documentation\n" | 170 error_handler $? "\nError while generating Doxygen documentation\n" |
171 fi | 171 fi |
172 | 172 |
173 printf "Cleaning build environment..." | 173 printf "Cleaning build environment..." |
174 ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory coreclean" | 174 ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory coreclean &>/dev/null" |
175 error_handler $? "\nError cleaning core\n" | 175 error_handler $? "\nError cleaning core\n" |
176 | 176 |
177 #------------- | 177 #------------- |
178 #Installing IDE | 178 #Installing IDE |
179 [ $ALWAYS_YES -eq 0 ] && ALWAYS_YES_FLAG= || ALWAYS_YES_FLAG="-y" | 179 [ $ALWAYS_YES -eq 0 ] && ALWAYS_YES_FLAG= || ALWAYS_YES_FLAG="-y" |
180 ls $IDE_FOLDER/scripts/setup_IDE.sh >/dev/null 2>/dev/null | 180 [ $FULL -eq 1 ] && NO_FRILLS_FLAG= || NO_FRILLS_FLAG="--no-frills" |
181 ls $IDE_FOLDER/scripts/update_IDE >/dev/null 2>/dev/null | |
181 if [ $? -eq 0 ] | 182 if [ $? -eq 0 ] |
182 then | 183 then |
183 export BBB_ADDRESS BBB_BELA_HOME | 184 export BBB_ADDRESS BBB_BELA_HOME |
184 cd $IDE_FOLDER/scripts && ./setup_IDE.sh $ALWAYS_YES_FLAG | 185 cd $IDE_FOLDER/scripts && ./update_IDE $ALWAYS_YES_FLAG $NO_FRILLS_FLAG |
185 # run the IDE | 186 # The IDE is restarted by the update_IDE script |
186 [ $FULL -eq 1 ] && ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" | |
187 else | 187 else |
188 # run the IDE | 188 # run the IDE |
189 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. | 189 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. |
190 You can get a copy of the most up-to-date IDE files from https://github.com/LBDonovan/bela-ide" | 190 You can get a copy of the most up-to-date IDE files from https://github.com/LBDonovan/bela-ide\n" |
191 [ $FULL -eq 1 ] && ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" &&\ | 191 [ $FULL -eq 1 ] && printf "If there was an older version of the IDE on the board, it is being restarted.\n\n" &&\ |
192 echo "If there was an older version of the IDE on the board, it is being restarted." | 192 ssh $BBB_ADDRESS "make -C $BBB_BELA_HOME --no-print-directory idestart" |
193 fi | 193 fi |
194 | 194 |
195 [ $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" | 195 [ $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" |
196 | 196 |
197 [ $ALWAYS_YES -eq 1 ] && printf "\nSetup complete.\n\n" || { | 197 [ $ALWAYS_YES -eq 1 ] && printf "\nSetup complete.\n\n" || { |
198 printf '\nSetup complete, press any key to continue\n\n' | 198 printf '\nSetup complete, press any key to continue . . .\n\n' |
199 read | 199 read |
200 } | 200 } |