Mercurial > hg > beaglert
comparison scripts/build_pd_heavy.sh @ 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 | 441c8429f27c |
children | e9821d65b9ba |
comparison
equal
deleted
inserted
replaced
489:45dee9066d43 | 490:b6b532e88a5c |
---|---|
104 #TODO: get a reliable, exhaustive, up-to-date list. | 104 #TODO: get a reliable, exhaustive, up-to-date list. |
105 HEAVY_FILES='Heavy* Hv*' | 105 HEAVY_FILES='Heavy* Hv*' |
106 | 106 |
107 set_date | 107 set_date |
108 reference_time_file="$projectpath"/ | 108 reference_time_file="$projectpath"/ |
109 trap "kill -9 "'$BACKGROUND_PROCESS_PID'"; exit 0;" 2 9 | 109 |
110 uploadBuildRun(){ | 110 uploadBuildRun(){ |
111 if [ $NO_UPLOAD -eq 0 ]; then | 111 if [ $NO_UPLOAD -eq 0 ]; then |
112 # remove old static files to avoid obsolete errors | 112 # remove old static files to avoid obsolete errors |
113 # make sure the path is not empty, so avoiding to rm -rf / by mistake | 113 # make sure the path is not empty, so avoiding to rm -rf / by mistake |
114 [ -z $projectpath ] && { echo 'ERROR: $projectpath is empty.'; exit 0; } | 114 [ -z $projectpath ] && { echo 'ERROR: $projectpath is empty.'; exit 0; } |
183 else | 183 else |
184 echo "Building and running project..." | 184 echo "Building and running project..." |
185 if [ $WATCH -eq 1 ] | 185 if [ $WATCH -eq 1 ] |
186 then | 186 then |
187 # try to emulate run_without_screen: run with fifo | 187 # try to emulate run_without_screen: run with fifo |
188 [ $RUN_WITHOUT_SCREEN -eq 1 ] && { ssh $BBB_ADDRESS "$MAKE_COMMAND runscreenfifo"& BACKGROUND_PROCESS_PID=$!; } ||\ | 188 if [ $RUN_WITHOUT_SCREEN -eq 1 ]; |
189 { ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen"; } | 189 then |
190 ssh $BBB_ADDRESS "$MAKE_COMMAND runscreenfifo" & BACKGROUND_PROCESS_PID=$! | |
191 # run this in the background, it will be killed anyhow when the process stops. | |
192 # Either with the trap below or in another way | |
193 trap "kill $BACKGROUND_PROCESS_PID; exit 0;" 2 9 | |
194 # add the line below to the trap if you want to kill the process on the board when you exit the script | |
195 # ssh -o ConnectTimeout 2 $BBB_ADDRESS make --no-print-directory -C $BBB_BELA_HOME stop ; | |
196 else | |
197 ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen" | |
198 fi | |
190 elif [ $RUN_WITHOUT_SCREEN -eq 1 ] | 199 elif [ $RUN_WITHOUT_SCREEN -eq 1 ] |
191 then | 200 then |
192 ssh -t $BBB_ADDRESS "$MAKE_COMMAND run" | 201 ssh -t $BBB_ADDRESS "$MAKE_COMMAND run" |
193 elif [ $RUN_IN_FOREGROUND -eq 1 ] | 202 elif [ $RUN_IN_FOREGROUND -eq 1 ] |
194 then | 203 then |