# HG changeset patch # User Giulio Moro # Date 1466525679 -3600 # Node ID b6b532e88a5c1973931cdf135474f2649511f6a0 # Parent 45dee9066d43df775ace8301a59124bf1068db52 build_pd_heavy.sh minor update diff -r 45dee9066d43 -r b6b532e88a5c scripts/build_pd_heavy.sh --- 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"