diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-17 19:50:22 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-17 19:50:22 +0000 |
commit | a037c0b8f2271f1a4addb9e2384f74336fcb4dc3 (patch) | |
tree | f47e53752982492b5ee0d3fb48d7d32269a0a9d2 /jenkins.sh | |
parent | f2727d7cdec553da2e9381db75c8b37683b3f0e9 (diff) |
jenkins.sh: Exit early when an error is detected.
Instead of just printing an help message and continuing.
Change-Id: I6734639095589c861e72d8c0f4a444b86fefa1fc
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-x | jenkins.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -24,16 +24,17 @@ PS4='+ $PRGNAME: ${FUNCNAME+"$FUNCNAME : "}$LINENO: ' usage() { + ret=1 + [ x"$1" != x ] && ret=$1 cat << EOF jenkins.sh [--help] [-s snapshot dir] [g git reference dir] [--abedir path] [-w workspace] EOF - return 0 + exit $ret } if test $# -lt 1; then echo "ERROR: No options for build!" usage -# exit fi # Directory of ABE source files @@ -113,7 +114,8 @@ while test $# -gt 0; do -b|--bootstrap) try_bootstrap="true" ;; --excludecheck) excludecheck_opt="$excludecheck_opt --excludecheck $2"; shift ;; --norebuild) rebuild=false ;; - -h|--help) usage ;; + -h|--help) usage 0 ;; + *) usage ;; esac shift done |