changeset 525:1ca196e35105 prerelease

Upated scripts
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 23 Jun 2016 13:22:59 +0100
parents 9f455f01edd5
children 617da76ae4d9 ddb86944e138
files scripts/.bela_common scripts/build_pd_heavy.sh scripts/build_project.sh
diffstat 3 files changed, 16 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/.bela_common	Thu Jun 23 10:19:24 2016 +0100
+++ b/scripts/.bela_common	Thu Jun 23 13:22:59 2016 +0100
@@ -42,6 +42,10 @@
 	}
 }
 
+build_script_usage_brief(){
+	printf "Usage: $THIS_SCRIPT [-c command-line-args] [-nbfF] [--watch] [--clean]%s <directory-with-source-files>" "$1"
+}
+
 build_script_usage(){
 	echo "	The program can be run in one of the following modes:
 		-f arg : runs in the foreground (default).
@@ -53,7 +57,7 @@
 	the current process and \`./connect_to_project.sh' to see the program's output.
 
 	Other options:
-	--clean : cleans the pre-compiled object files on the board (same as \`-m coreclean').
+	--clean : cleans the pre-compiled object files on the board (same as \`-m projectclean').
 	          If the linker issues warnings during a build, or you see that your latest changes are not
 	          being applied to the running program, try to add the --clean flag for the next build and see 
 	          if that fixes it. 
--- a/scripts/build_pd_heavy.sh	Thu Jun 23 10:19:24 2016 +0100
+++ b/scripts/build_pd_heavy.sh	Thu Jun 23 13:22:59 2016 +0100
@@ -35,14 +35,12 @@
 
 usage ()
 {
+build_script_usage_brief ' [-o] [--noupload] [-r|--release release] '
 echo "
-USAGE: build_pd.sh [[-i input folder containing _main.pd file ]
- [-o output folder for temp heavy project .c files (default $projectpath)]
- [-b remote path to copy to (default ~/Bela)] | [-h] | [-w|--watch] | [-n|--noupload] | [-r|--release arg]
-
-example: build_pd.sh -o ../projects/heavy/hello-world ../projects/heavy/pd/hello-world
-
--r allows to build against a specific Heavy release. Default is the most recent version.
+        example: build_pd.sh -o ../projects/heavy/hello-world ../projects/heavy/pd/hello-world
+      
+        -r allows to build against a specific Heavy release. Default is the 
+            most recent release ( see revision list here https://enzienaudio.com/a/releases )
 "
 	build_script_usage
 }
@@ -78,11 +76,11 @@
 			BBB_PROJECT_NAME="$1"
 		;;	
 		--clean)
-			BBB_MAKEFILE_OPTIONS="$BBB_MAKEFILE_OPTIONS clean"
+			BBB_MAKEFILE_OPTIONS="$BBB_MAKEFILE_OPTIONS projectclean"
 		;;
 		-m)
 			shift
-			BBB_MAKEFILE_OPTIONS="BBB_MAKEFILE_OPTIONS $1"
+			BBB_MAKEFILE_OPTIONS="$BBB_MAKEFILE_OPTIONS $1"
 		;;
 		--watch)
 			WATCH=1
@@ -141,7 +139,6 @@
 	    rm -rf "$projectpath"/$file
 	done
         # invoke the online compiler
-		echo "$BELA_PYTHON27" $HVRESOURCES_DIR/uploader.py "$pdpath"/ -n $ENZIENAUDIO_COM_PATCH_NAME -g c -o "$projectpath" $RELEASE_STRING
         "$BELA_PYTHON27" $HVRESOURCES_DIR/uploader.py "$pdpath"/ -n $ENZIENAUDIO_COM_PATCH_NAME -g c -o "$projectpath" $RELEASE_STRING ||\
             { echo "ERROR: an error occurred while executing the uploader.py script"; exit 1; }
     fi;
@@ -197,7 +194,7 @@
     # Make new Bela executable and run
     # It does not look very nice that we type the same things over and over
     # but that is because each line is an ssh session in its own right
-    MAKE_COMMAND="make stop -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'"
+    MAKE_COMMAND="make --no-print-directory QUIET=true -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS' $BBB_MAKEFILE_OPTIONS"
     if [ $RUN_PROJECT -eq 0 ]
     then
         echo "Building project..."
--- a/scripts/build_project.sh	Thu Jun 23 10:19:24 2016 +0100
+++ b/scripts/build_project.sh	Thu Jun 23 13:22:59 2016 +0100
@@ -13,8 +13,9 @@
 usage()
 {
 	THIS_SCRIPT=`basename "$0"`
-	echo "Usage: $THIS_SCRIPT [-c command-line-args] [-nbfF] <directory-with-source-files>"
+	build_script_usage_brief
 	echo "
+
 	This script copies a directory of source files to the BeagleBone, compiles
 	and runs it. The Bela core files should have first been copied over
 	using the \`update_board' script once.
@@ -54,7 +55,7 @@
 			BBB_PROJECT_NAME="$1"
 		;;	
 		--clean)
-			BBB_MAKEFILE_OPTIONS="$BBB_MAKEFILE_OPTIONS clean"
+			BBB_MAKEFILE_OPTIONS="$BBB_MAKEFILE_OPTIONS projectclean"
 		;;
 		-m)
 			shift