Mercurial > hg > beaglert
comparison scripts/build_project.sh @ 277:4b3ae93ab102 prerelease
build_project.sh allows to pass a custom project name
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 17 May 2016 16:07:35 +0100 |
parents | 428f13c2cb49 |
children | b99b8ab317dd |
comparison
equal
deleted
inserted
replaced
276:a14fe8b0f588 | 277:4b3ae93ab102 |
---|---|
11 [ -z "$RUN_PROJECT" ] && RUN_PROJECT=1 | 11 [ -z "$RUN_PROJECT" ] && RUN_PROJECT=1 |
12 [ -z "$COMMAND_ARGS" ] && COMMAND_ARGS= | 12 [ -z "$COMMAND_ARGS" ] && COMMAND_ARGS= |
13 [ -z "$RUN_IN_FOREGROUND" ] && RUN_IN_FOREGROUND=1 | 13 [ -z "$RUN_IN_FOREGROUND" ] && RUN_IN_FOREGROUND=1 |
14 [ -z "$RUN_WITHOUT_SCREEN" ] && RUN_WITHOUT_SCREEN=0 | 14 [ -z "$RUN_WITHOUT_SCREEN" ] && RUN_WITHOUT_SCREEN=0 |
15 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/" | 15 [ -z "$BBB_PROJECT_HOME" ] && BBB_PROJECT_HOME="${BBB_BELA_HOME}/projects/" |
16 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME="scriptUploadedProject" | 16 [ -z "$BBB_DEFAULT_PROJECT_NAME" ] && BBB_DEFAULT_PROJECT_NAME="scriptUploadedProject" |
17 [ -z "$BBB_PROJECT_NAME" ] && BBB_PROJECT_NAME=$BBB_DEFAULT_PROJECT_NAME | |
17 | 18 |
18 function usage | 19 function usage |
19 { | 20 { |
20 THIS_SCRIPT=`basename "$0"` | 21 THIS_SCRIPT=`basename "$0"` |
21 echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone] [-c command-line-args] [-nfF] <directory-with-source-files>" | 22 echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone] [-c command-line-args] [-nfF] <directory-with-source-files>" |
37 in a screen in the background, so no output is shown." | 38 in a screen in the background, so no output is shown." |
38 } | 39 } |
39 | 40 |
40 OPTIND=1 | 41 OPTIND=1 |
41 | 42 |
42 while getopts "b:c:nfFh" opt; do | 43 while getopts "b:c:nfFhp:" opt; do |
43 case $opt in | 44 case $opt in |
44 b) BBB_BELA_HOME=$OPTARG | 45 b) BBB_BELA_HOME=$OPTARG |
45 ;; | 46 ;; |
46 c) COMMAND_ARGS=$OPTARG | 47 c) COMMAND_ARGS=$OPTARG |
47 ;; | 48 ;; |
48 f) RUN_IN_FOREGROUND=0 | 49 f) RUN_IN_FOREGROUND=0 |
49 ;; | 50 ;; |
50 F) RUN_WITHOUT_SCREEN=1 | 51 F) RUN_WITHOUT_SCREEN=1 |
51 ;; | 52 ;; |
52 n) RUN_PROJECT=0 | 53 n) RUN_PROJECT=0 |
53 ;; | 54 ;; |
55 p) BBB_PROJECT_NAME=$OPTARG | |
56 ;; | |
54 h|\?) usage | 57 h|\?) usage |
55 exit 1 | 58 exit 1 |
56 esac | 59 esac |
57 done | 60 done |
58 | 61 |