Mercurial > hg > beaglert
comparison scripts/build_pd_heavy.sh @ 329:9a2a5f14b587 prerelease
Updated build_pd_heavy to work with the latest makefile.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 04 Jun 2016 14:10:45 +0100 |
parents | e63d35c6ae96 |
children | d2ce15eed8c1 |
comparison
equal
deleted
inserted
replaced
328:abd7795dad5d | 329:9a2a5f14b587 |
---|---|
148 | 148 |
149 echo "updating files on board..." | 149 echo "updating files on board..." |
150 | 150 |
151 BBB_PROJECT_FOLDER=$BBB_PROJECT_HOME"/"$BBB_PROJECT_NAME #make sure there is no trailing slash here | 151 BBB_PROJECT_FOLDER=$BBB_PROJECT_HOME"/"$BBB_PROJECT_NAME #make sure there is no trailing slash here |
152 BBB_NETWORK_TARGET_FOLDER=$BBB_ADDRESS:$BBB_PROJECT_FOLDER | 152 BBB_NETWORK_TARGET_FOLDER=$BBB_ADDRESS:$BBB_PROJECT_FOLDER |
153 echo rsync -c -rv --exclude 'HvContext*' "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER"; | |
153 rsync -c -rv --exclude 'HvContext*' "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER"; | 154 rsync -c -rv --exclude 'HvContext*' "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER"; |
154 # rsync -c -rv "$projectpath"/ "$BBB_ADDRESS":"$BBB_BELA_HOME"/source; | 155 # rsync -c -rv "$projectpath"/ "$BBB_ADDRESS":"$BBB_BELA_HOME"/source; |
155 | 156 |
156 # for whatever reason these big files used to hang when transferring with rsync | 157 # for whatever reason these big files used to hang when transferring with rsync |
157 scp "$projectpath"/HvContext* $BBB_NETWORK_TARGET_FOLDER | 158 scp "$projectpath"/HvContext* $BBB_NETWORK_TARGET_FOLDER |
169 # echo "UPDATEDFILES : $UPDATED_FILES" | 170 # echo "UPDATEDFILES : $UPDATED_FILES" |
170 # exit 2 | 171 # exit 2 |
171 # remove old executable and heavy context .o/.d files | 172 # remove old executable and heavy context .o/.d files |
172 ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; | 173 ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; |
173 SCREEN_NAME=BeagleRT | 174 SCREEN_NAME=BeagleRT |
174 KILL_RUNNING_PROCESS="bash -c 'kill -s 2 \`pidof BeagleRT\` 2>/dev/null; screen -r $SCREEN_NAME -X quit 2>/dev/null; sleep 0.5; exit 0'" #always returns true | 175 # Make new BeagleRT execut/able and run |
175 # Make new BeagleRT executable and run | |
176 # It does not look very nice that we type the same things over and over | 176 # It does not look very nice that we type the same things over and over |
177 # but that is because each line is an ssh session in its own right | 177 # but that is because each line is an ssh session in its own right |
178 MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'" | |
178 if [ $RUN_PROJECT -eq 0 ] | 179 if [ $RUN_PROJECT -eq 0 ] |
179 then | 180 then |
180 echo "Building project..." | 181 echo "Building project..." |
181 ssh $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME" | 182 ssh $BBB_ADDRESS "$MAKE_COMMAND" |
182 else | 183 else |
183 echo "Building and running project..." | 184 echo "Building and running project..." |
184 if [ $RUN_WITHOUT_SCREEN -eq 1 ] | 185 if [ $RUN_WITHOUT_SCREEN -eq 1 ] |
185 then | 186 then |
186 ssh -t $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME && $KILL_RUNNING_PROCESS && $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS" | 187 ssh -t $BBB_ADDRESS "$MAKE_COMMAND run" |
187 elif [ $RUN_IN_FOREGROUND -eq 1 ] | 188 elif [ $RUN_IN_FOREGROUND -eq 1 ] |
188 then | 189 then |
189 # Run in screen without detaching | 190 # Run in screen without detaching |
190 ssh -t $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME&& $KILL_RUNNING_PROCESS && screen -S $SCREEN_NAME $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS" | 191 ssh -t $BBB_ADDRESS "$MAKE_COMMAND runscreenfg" |
191 else | 192 else |
192 # Run in screen and detach | 193 # Run in screen and detach |
193 ssh $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME && $KILL_RUNNING_PROCESS && screen -dmS $SCREEN_NAME $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS" | 194 ssh -t $BBB_ADDRESS "$MAKE_COMMAND runscreen" |
194 | |
195 fi | 195 fi |
196 fi | 196 fi |
197 } #checkUploadBuildRun | 197 } #checkUploadBuildRun |
198 | 198 |
199 checkUploadBuildRun | 199 checkUploadBuildRun |