comparison scripts/build_pd_heavy.sh @ 431:cfd1f896cc6f prerelease

Updated and fixed build_pd_heavy.sh
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 16 Jun 2016 20:02:05 +0100
parents 2e01a9d6cb58
children e49ae69acbe8
comparison
equal deleted inserted replaced
430:2e01a9d6cb58 431:cfd1f896cc6f
3 # shell script for automatic uploading/compiling of pd patch onto bbb 3 # shell script for automatic uploading/compiling of pd patch onto bbb
4 # Christian Heinrichs 2015 4 # Christian Heinrichs 2015
5 # 5 #
6 # example usage: sh upload-and-compile.sh -f bwg-tests -q -e 6 # example usage: sh upload-and-compile.sh -f bwg-tests -q -e
7 7
8 trap "{ echo "";exit 0; }" SIGINT SIGTERM 8 trap "{ echo "";exit 0; }" 2
9 9
10 workingdir=".." 10 workingdir=".."
11 verbose="0" 11 verbose="0"
12 render="0" 12 render="0"
13 pdpath="" 13 pdpath=""
14 NO_UPLOAD="0" 14 NO_UPLOAD="0"
15 WATCH="0" 15 WATCH="0"
16 FORCE="0" 16 FORCE="0"
17 #make sure the paths have the trailing / . 17 #make sure the paths have the trailing / .
18 projectpath="../projects/heavy/hvtemp/" 18 projectpath="../tmp/heavy/hvtemp/"
19 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" 19 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2"
20 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/" 20 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/"
21 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/" 21 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/"
22 BBB_DEFAULT_PROJECT_NAME="heavyProject" 22 BBB_DEFAULT_PROJECT_NAME="heavyProject"
23 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME 23 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME
98 RELEASE_STRING= 98 RELEASE_STRING=
99 else 99 else
100 RELEASE_STRING="-r $release" 100 RELEASE_STRING="-r $release"
101 fi 101 fi
102 102
103 #create destination folder if it does not exist"
104 mkdir -p "$projectpath"
105
103 uploadBuildRun(){ 106 uploadBuildRun(){
104 if [ $NO_UPLOAD -eq 0 ]; then 107 if [ $NO_UPLOAD -eq 0 ]; then
105 # remove old static files to avoid obsolete errors 108 # remove old static files to avoid obsolete errors
106 # use -rf to prevent warnings in case they do not exist 109 # use -rf to prevent warnings in case they do not exist
107 rm -rf "$projectpath"/Hv* "$projectpath"/Message* "$projectpath"/Control* "$projectpath"/Signal* >/dev/null 2>&1 110 rm -rf "$projectpath"/Hv* "$projectpath"/Message* "$projectpath"/Control* "$projectpath"/Signal* >/dev/null 2>&1
157 # exit 2 160 # exit 2
158 # remove old executable and heavy context .o/.d files 161 # remove old executable and heavy context .o/.d files
159 if [ $NO_UPLOAD -eq 0 ]; then 162 if [ $NO_UPLOAD -eq 0 ]; then
160 ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; 163 ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME;
161 fi; 164 fi;
162 SCREEN_NAME=Bela
163 # Make new Bela execut/able and run 165 # Make new Bela execut/able and run
164 # It does not look very nice that we type the same things over and over 166 # It does not look very nice that we type the same things over and over
165 # but that is because each line is an ssh session in its own right 167 # but that is because each line is an ssh session in its own right
166 MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'" 168 MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'"
167 if [ $RUN_PROJECT -eq 0 ] 169 if [ $RUN_PROJECT -eq 0 ]