Mercurial > hg > beaglert
changeset 490:b6b532e88a5c prerelease
build_pd_heavy.sh minor update
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 17:14:39 +0100 |
parents | 45dee9066d43 |
children | 89212ad6a0bf |
files | scripts/build_pd_heavy.sh |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/build_pd_heavy.sh Tue Jun 21 16:44:50 2016 +0100 +++ b/scripts/build_pd_heavy.sh Tue Jun 21 17:14:39 2016 +0100 @@ -106,7 +106,7 @@ set_date reference_time_file="$projectpath"/ -trap "kill -9 "'$BACKGROUND_PROCESS_PID'"; exit 0;" 2 9 + uploadBuildRun(){ if [ $NO_UPLOAD -eq 0 ]; then # remove old static files to avoid obsolete errors @@ -185,8 +185,17 @@ if [ $WATCH -eq 1 ] then # try to emulate run_without_screen: run with fifo - [ $RUN_WITHOUT_SCREEN -eq 1 ] && { ssh $BBB_ADDRESS "$MAKE_COMMAND runscreenfifo"& BACKGROUND_PROCESS_PID=$!; } ||\ - { ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen"; } + if [ $RUN_WITHOUT_SCREEN -eq 1 ]; + then + ssh $BBB_ADDRESS "$MAKE_COMMAND runscreenfifo" & BACKGROUND_PROCESS_PID=$! + # run this in the background, it will be killed anyhow when the process stops. + # Either with the trap below or in another way + trap "kill $BACKGROUND_PROCESS_PID; exit 0;" 2 9 + # add the line below to the trap if you want to kill the process on the board when you exit the script + # ssh -o ConnectTimeout 2 $BBB_ADDRESS make --no-print-directory -C $BBB_BELA_HOME stop ; + else + ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen" + fi elif [ $RUN_WITHOUT_SCREEN -eq 1 ] then ssh -t $BBB_ADDRESS "$MAKE_COMMAND run"