comparison scripts/build_pd_heavy.sh @ 377:a430a16d2c02 prerelease

Updated scripts so that the Bela folder on the bbb is ~/Bela. Note: BeagleRT_startup.sh is still the same (because the reference to it needs to be changed in /etc/init.d/ ....
author Giulio Moro <giuliomoro@yahoo.it>
date Sat, 11 Jun 2016 01:54:43 +0100
parents 4fe4aa2cdfa2
children 8a7c35ee8b3f
comparison
equal deleted inserted replaced
376:9d2ed561aac5 377:a430a16d2c02
14 WATCH="0" 14 WATCH="0"
15 FORCE="0" 15 FORCE="0"
16 #make sure the paths have the trailing / . 16 #make sure the paths have the trailing / .
17 projectpath="../projects/heavy/hvtemp/" 17 projectpath="../projects/heavy/hvtemp/"
18 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" 18 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2"
19 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/BeagleRT/" 19 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/"
20 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/" 20 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/"
21 BBB_DEFAULT_PROJECT_NAME="heavyProject" 21 BBB_DEFAULT_PROJECT_NAME="heavyProject"
22 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME 22 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME
23 COMMAND_ARGS= 23 COMMAND_ARGS=
24 RUN_PROJECT=1 24 RUN_PROJECT=1
45 45
46 function usage 46 function usage
47 { 47 {
48 printf "\nUSAGE: build_pd.sh [[-i input folder containing _main.pd file ]\ 48 printf "\nUSAGE: build_pd.sh [[-i input folder containing _main.pd file ]\
49 [-o output folder for new heavy project .c files (default ../projects/heavy/hvtemp)]\ 49 [-o output folder for new heavy project .c files (default ../projects/heavy/hvtemp)]\
50 [-b bbb path to copy to (default ~/BeagleRT)] | [-h] | [-f|--force] | [-w|--watch]\n" 50 [-b bbb path to copy to (default ~/Bela)] | [-h] | [-f|--force] | [-w|--watch]\n"
51 printf "\nexample: build_pd.sh -i ../projects/heavy/pd/hello-world -o ../projects/heavy/hello-world\n" 51 printf "\nexample: build_pd.sh -i ../projects/heavy/pd/hello-world -o ../projects/heavy/hello-world\n"
52 echo "If --watch is selected, the script will check every 1s for any file that is modified in the source folder, which triggers\ 52 echo "If --watch is selected, the script will check every 1s for any file that is modified in the source folder, which triggers\
53 the building process and runs the process. 53 the building process and runs the process.
54 If --screen is selected, the prompt returns to the user after launching BeagleRT in a screen on the target device. 54 If --screen is selected, the prompt returns to the user after launching Bela in a screen on the target device.
55 If --screen and --watch are combined, while the process is running in the screen, modifications to the source files will \ 55 If --screen and --watch are combined, while the process is running in the screen, modifications to the source files will \
56 still trigger a new build." 56 still trigger a new build."
57 } 57 }
58 58
59 while [ "$1" != "" ]; do 59 while [ "$1" != "" ]; do
167 # UPDATED_FILES=`rsync -naic --log-format="%f" "$projectpath" "$BBB_BELA_HOME"/source | grep -v "\.$"` 167 # UPDATED_FILES=`rsync -naic --log-format="%f" "$projectpath" "$BBB_BELA_HOME"/source | grep -v "\.$"`
168 # echo "UPDATEDFILES : $UPDATED_FILES" 168 # echo "UPDATEDFILES : $UPDATED_FILES"
169 # exit 2 169 # exit 2
170 # sets the date, remove old executable and heavy context .o/.d files 170 # sets the date, remove old executable and heavy context .o/.d files
171 ssh $BBB_ADDRESS "date -s '`date`' > /dev/null; rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; 171 ssh $BBB_ADDRESS "date -s '`date`' > /dev/null; rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME;
172 SCREEN_NAME=BeagleRT 172 SCREEN_NAME=Bela
173 # Make new BeagleRT execut/able and run 173 # Make new Bela execut/able and run
174 # It does not look very nice that we type the same things over and over 174 # It does not look very nice that we type the same things over and over
175 # but that is because each line is an ssh session in its own right 175 # but that is because each line is an ssh session in its own right
176 MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'" 176 MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'"
177 if [ $RUN_PROJECT -eq 0 ] 177 if [ $RUN_PROJECT -eq 0 ]
178 then 178 then