# HG changeset patch # User Giulio Moro # Date 1463407176 -3600 # Node ID b491eb027f826383c6a9f06148f3d53db9528118 # Parent f51132ee008068646d263fc29e3e7b08e17fcbb3 build_project.sh defaults rewritten. diff -r f51132ee0080 -r b491eb027f82 scripts/build_project.sh --- 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 {