diff scripts/.bela_common @ 523:42f6af3a5f1d prerelease

build_project and build_pd_heavy mostly done
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 23 Jun 2016 04:31:09 +0100
parents c774bd8ad108
children 1ca196e35105
line wrap: on
line diff
--- a/scripts/.bela_common	Thu Jun 23 03:46:56 2016 +0100
+++ b/scripts/.bela_common	Thu Jun 23 04:31:09 2016 +0100
@@ -15,7 +15,8 @@
 folder_has_changed(){
 	[ -z "$2" ] && { echo "Error: folder_has_changed(folder, reference, [filter])"; return 1; }
 	[ -z "$3" ] && FILTER="." || FILTER="$3"
-	find "$1" -type f -newer "$2" | grep "$FILTER"
+	# Do not watch hidden files or folders 
+	find "$1" -type f -not -path '*/\.*' -newer "$2" | grep "$FILTER"
 	return $?
 }
 
@@ -40,3 +41,33 @@
 		exit 1;
 	}
 }
+
+build_script_usage(){
+	echo "	The program can be run in one of the following modes:
+		-f arg : runs in the foreground (default).
+		-b arg : runs in the background (no output is shown)
+
+	When running in the foreground you can stop the currently running program 
+	with ctrl-C.
+	When running in the background, you can use \`./stop_running.sh' to stop
+	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').
+	          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. 
+	
+	--watch: the script will wait for changes in the source folder and when it detects them it
+	         triggers a new build. If you do not run the program with -b, then you will have to
+			 either kill the process or detach from the screen in order for the watchdog to be active.
+	-n : the output will not be run after compiling.
+	-c \"args\" : passes command-line arguments to the Bela program; e
+	              close the argument string in quotes.
+	-p arg : sets the name of the project to in the remote folder (default: $BBB_PROJECT_NAME ) 
+	         do not use spaces in your project names, please
+	-m \"args\" allows to pass arguments to the Makefile before the run target. For instance,
+	           pass -m \`"projectclean"\` or \`-m "distclean"\` to clean project-specific
+	           pre-built objects, or all the pre-built objects, respectively.
+	"
+}