changeset 262:b491eb027f82 prerelease

build_project.sh defaults rewritten.
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 16 May 2016 14:59:36 +0100
parents f51132ee0080
children 7fe0d7c54bce
files scripts/build_project.sh
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/build_project.sh	Mon May 16 14:50:18 2016 +0100
+++ b/scripts/build_project.sh	Mon May 16 14:59:36 2016 +0100
@@ -4,13 +4,14 @@
 # optionally runs it. Pass a directory path in the first argument. 
 # The source files in this directory are copied to the board and compiled.
 
-BBB_ADDRESS="root@192.168.7.2"
-BBB_PATH="~/BeagleRT"
-RUN_PROJECT=1
-COMMAND_ARGS=
-RUN_IN_FOREGROUND=0
-RUN_WITHOUT_SCREEN=0
-SCREEN_NAME=Bela
+# set defaults unless variables are already set
+[ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2"
+[ -z "$BBB_PATH" ] && BBB_PATH="~/BeagleRT"
+[ -z "$RUN_PROJECT" ] && RUN_PROJECT=1
+[ -z "$COMMAND_ARGS" ] && COMMAND_ARGS=
+[ -z "$RUN_IN_FOREGROUND" ] && RUN_IN_FOREGROUND=1
+[ -z "$RUN_WITHOUT_SCREEN" ] && RUN_WITHOUT_SCREEN=0
+[ -z "$SCREEN_NAME" ] && SCREEN_NAME=Bela
 
 function usage
 {