changeset 275:428f13c2cb49 prerelease

build_project.sh fixed folder handling by rsync
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 17 May 2016 15:12:08 +0100
parents 247a182adb6d
children a14fe8b0f588
files scripts/build_project.sh
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/build_project.sh	Tue May 17 14:38:03 2016 +0100
+++ b/scripts/build_project.sh	Tue May 17 15:12:08 2016 +0100
@@ -81,7 +81,7 @@
     exit
 fi
 
-BBB_PROJECT_FOLDER=$BBB_PROJECT_HOME"/"$BBB_PROJECT_NAME"/"
+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
 
 # Stop BeagleRT and clean out old source files
@@ -93,7 +93,7 @@
 HOST_SOURCE_PATH= #initially empty, will be filled with input arguments
 for i in "$@" #parse input arguments
 do
-  HOST_SOURCE_PATH+=" $1 "
+  HOST_SOURCE_PATH+=" $1"
   shift
   # Copy new souce files to the board
 done
@@ -108,7 +108,7 @@
     scp $HOST_SOURCE_PATH "$BBB_NETWORK_TARGET_FOLDER"
 else
     #rsync --delete makes sure it removes files that are not in the origin folder
-    rsync -av --delete-after --exclude=build $HOST_SOURCE_PATH "$BBB_NETWORK_TARGET_FOLDER"
+    rsync -av --delete-after --exclude=build $HOST_SOURCE_PATH"/" "$BBB_NETWORK_TARGET_FOLDER/" #trailing slashes used here make sure rsync does not create another folder inside the target folder
 fi;
 
 if [ $? -ne 0 ]