changeset 278:3c3d042dad12 prerelease

merge
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 17 May 2016 16:07:45 +0100
parents 4b3ae93ab102 (diff) cf98c06c72fd (current diff)
children 8329f234d914 c55c6f6c233c
files
diffstat 3 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Doxyfile	Tue May 17 16:42:02 2016 +0100
+++ b/Doxyfile	Tue May 17 16:07:45 2016 +0100
@@ -648,7 +648,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  =	include/BeagleRT.h include/Utilities.h include/digital_gpio_mapping.h include/PulseIn.h include/Scope.h include/Midi.h include/UdpClient.h include/WriteFile.h projects/
+INPUT                  =	include/BeagleRT.h include/Utilities.h include/digital_gpio_mapping.h include/PulseIn.h include/Scope.h include/Midi.h include/UdpClient.h include/WriteFile.h 
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--- a/core/UdpClient.cpp	Tue May 17 16:42:02 2016 +0100
+++ b/core/UdpClient.cpp	Tue May 17 16:07:45 2016 +0100
@@ -10,7 +10,6 @@
 		outSocket=socket(AF_INET, SOCK_DGRAM, 0);
 		int broadcastEnable = 1;
 		int ret = setsockopt(outSocket, SOL_SOCKET, SO_BROADCAST, &broadcastEnable, sizeof(broadcastEnable));
-		printf("setsockopt returned %d\n", ret);
 		isSetPort=false;
 		isSetServer=false;
 		enabled=false;
--- a/scripts/build_project.sh	Tue May 17 16:42:02 2016 +0100
+++ b/scripts/build_project.sh	Tue May 17 16:07:45 2016 +0100
@@ -13,7 +13,8 @@
 [ -z "$RUN_IN_FOREGROUND" ] && RUN_IN_FOREGROUND=1
 [ -z "$RUN_WITHOUT_SCREEN" ] && RUN_WITHOUT_SCREEN=0
 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/"
-[ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME="scriptUploadedProject"
+[ -z "$BBB_DEFAULT_PROJECT_NAME" ] && BBB_DEFAULT_PROJECT_NAME="scriptUploadedProject"
+[ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME
 
 function usage
 {
@@ -39,18 +40,20 @@
 
 OPTIND=1
 
-while getopts "b:c:nfFh" opt; do
+while getopts "b:c:nfFhp:" opt; do
     case $opt in
         b)            BBB_BELA_HOME=$OPTARG
                       ;;
         c)            COMMAND_ARGS=$OPTARG
                       ;;
         f)            RUN_IN_FOREGROUND=0
-			          ;;
+                      ;;
         F)            RUN_WITHOUT_SCREEN=1
-			  		  ;;
+                      ;;
         n)    	      RUN_PROJECT=0
                       ;;
+	p)            BBB_PROJECT_NAME=$OPTARG
+		      ;;	
         h|\?)         usage
                       exit 1
     esac
@@ -81,7 +84,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 +96,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 +111,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 ]