# HG changeset patch # User Giulio Moro # Date 1466481833 -3600 # Node ID bfc60429cca6bfded0902db44a8af1d88b60642e # Parent cb875406a59407b05a53351e713f9513e14d70a5 build_pd_heavy improved robustness for relative paths diff -r cb875406a594 -r bfc60429cca6 scripts/build_pd_heavy.sh --- a/scripts/build_pd_heavy.sh Mon Jun 20 21:38:57 2016 +0100 +++ b/scripts/build_pd_heavy.sh Tue Jun 21 05:03:53 2016 +0100 @@ -131,7 +131,7 @@ ls "$projectpath"/$file >/dev/null 2>&1 || { echo "The online compiler failed, please try again."; exit 1; } done # Apply any Bela-specific patches here - cp "hvresources/HvUtils.h" $projectpath/; + cp "$SCRIPTDIR/hvresources/HvUtils.h" $projectpath/ || exit 1; BBB_PROJECT_FOLDER=$BBB_PROJECT_HOME"/"$BBB_PROJECT_NAME #make sure there is no trailing slash here BBB_NETWORK_TARGET_FOLDER=$BBB_ADDRESS:$BBB_PROJECT_FOLDER @@ -142,10 +142,10 @@ CUSTOM_RENDER_SOURCE_PATH="$pdpath/heavy/render.cpp" if [ -f "$CUSTOM_RENDER_SOURCE_PATH" ]; then echo "Found custom heavy/render.cpp file in input folder, using that one instead of the default one."; - cp "$CUSTOM_RENDER_SOURCE_PATH" "$projectpath/render.cpp" + cp "$CUSTOM_RENDER_SOURCE_PATH" "$projectpath/render.cpp" || exit 1 else echo "Using default heavy/render.cpp" - cp "hvresources/heavy_render.cpp" "$projectpath/render.cpp" + cp "$SCRIPTDIR/hvresources/heavy_render.cpp" "$projectpath/render.cpp" || exit 1 fi echo "Updating files on board..." @@ -180,7 +180,6 @@ ssh $BBB_ADDRESS "$MAKE_COMMAND" else echo "Building and running project..." - echo "WATCH: $WATCH" if [ $WATCH -eq 1 ] then # try to emulate run_without_screen: run with fifo