changeset 479:bfc60429cca6 prerelease

build_pd_heavy improved robustness for relative paths
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 21 Jun 2016 05:03:53 +0100
parents cb875406a594
children 4ff80956c27a
files scripts/build_pd_heavy.sh
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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