Mercurial > hg > beaglert
diff scripts/build_pd_heavy.sh @ 492:e9821d65b9ba prerelease
Heavy: your patch on the enzienaudio website should be called bela. You need to update that from your enzienaudio.com account.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 17:36:58 +0100 |
parents | b6b532e88a5c |
children | 85ba865d3845 |
line wrap: on
line diff
--- a/scripts/build_pd_heavy.sh Tue Jun 21 17:24:20 2016 +0100 +++ b/scripts/build_pd_heavy.sh Tue Jun 21 17:36:58 2016 +0100 @@ -3,7 +3,6 @@ # shell script for automatic uploading/compiling of pd patch onto bbb # Christian Heinrichs 2015 # -# example usage: sh upload-and-compile.sh -f bwg-tests -q -e trap "{ echo "";exit 0; }" 2 @@ -47,7 +46,7 @@ { printf "\nUSAGE: build_pd.sh [[-i input folder containing _main.pd file ]\ [-o output folder for temp heavy project .c files (default $projectpath)]\ - [-b bbb path to copy to (default ~/Bela)] | [-h] | [-w|--watch] | [-n|--noupload] | [-r|--release arg]\n" + [-b remote path to copy to (default ~/Bela)] | [-h] | [-w|--watch] | [-n|--noupload] | [-r|--release arg]\n" printf "\nexample: build_pd.sh -i ../projects/heavy/pd/hello-world -o ../projects/heavy/hello-world\n" echo "If --watch is selected, the script will check every 1s for any file that is modified in the source folder, which re-triggers\ the building process. @@ -87,7 +86,7 @@ shift done -[ -z "$ENZIENAUDIO_COM_PATCH_NAME" ] && ENZIENAUDIO_COM_PATCH_NAME=bbb +[ -z "$ENZIENAUDIO_COM_PATCH_NAME" ] && ENZIENAUDIO_COM_PATCH_NAME=bela [ "$NO_UPLOAD" -eq 0 ] && [ -z "$pdpath" ] && { echo "Error: a path to the source folder should be provided"; exit 1; } if [ -z "$release" ] @@ -155,20 +154,16 @@ touch $reference_time_file # Transfer the files - rsync -ac --out-format=" %n" --no-t --delete-after --exclude='HvContext*' --exclude=build --exclude=$BBB_PROJECT_NAME "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER" &&\ + rsync -ac --out-format=" %n" --no-t --delete-during --exclude='HvContext_'$ENZIENAUDIO_COM_PATCH_NAME'.*' --exclude=build --exclude=$BBB_PROJECT_NAME "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER" &&\ { [ $NO_UPLOAD -eq 1 ] || scp "$projectpath"/HvContext* $BBB_NETWORK_TARGET_FOLDER; } ||\ { echo "ERROR: while synchronizing files with the BBB. Is the board connected?"; exit 1; } # TODO: rsync should upload a list of modified files, so that the corresponding objects can be deleted - # TODO: this should be run only when Heavy_bbb.h changes. Otherwise render is recompiled every time for no good reason + # TODO: this should be run only when Heavy_bela.h changes. Otherwise render is recompiled every time for no good reason #ssh $BBB_ADDRESS "rm -rf ${BBB_PROJECT_FOLDER}/build/render.*" #produce a list of files which content has changed (not just the date) - #TODO: could be made faster (perhaps) by backing up the folder locally instead of bbb - # UPDATED_FILES=`rsync -naic --log-format="%f" "$projectpath" "$BBB_BELA_HOME"/source | grep -v "\.$"` - # echo "UPDATEDFILES : $UPDATED_FILES" - # exit 2 - # remove old executable + # remove old executable to force re-linking #if [ $NO_UPLOAD -eq 0 ]; then # ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; #fi; @@ -239,4 +234,3 @@ uploadBuildRun done fi; -#ssh -t root@192.168.7.2 "kill -s 2 \`pidof heavy_template\` 2>/dev/null; sleep 0.5; rm -f ~/$filename_bbb/Release/source/heavy/HvContext_bbb.? ~/$filename_bbb/Release/heavy_template && make all -C ~/$filename_bbb/Release" &>/dev/null