diff options
author | David Williams | 2013-03-23 20:02:54 +0000 |
---|---|---|
committer | David Williams | 2013-03-23 20:02:54 +0000 |
commit | 6cd941c8cad97bed8a06c529416c988b4c9582d1 (patch) | |
tree | d0624c8826679fee5446a5335fdd4e2dc342b2eb /production/get-aggregator.sh | |
parent | 7506b166c6d9eaa418c4c5419918952da1f53373 (diff) | |
download | eclipse.platform.releng.aggregator-6cd941c8cad97bed8a06c529416c988b4c9582d1.tar.gz eclipse.platform.releng.aggregator-6cd941c8cad97bed8a06c529416c988b4c9582d1.tar.xz eclipse.platform.releng.aggregator-6cd941c8cad97bed8a06c529416c988b4c9582d1.zip |
Bug 400633 - Need to exit build on (bad) errors (one small step)
Diffstat (limited to 'production/get-aggregator.sh')
-rw-r--r-- | production/get-aggregator.sh | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/production/get-aggregator.sh b/production/get-aggregator.sh index 95a571137..f65d24eef 100644 --- a/production/get-aggregator.sh +++ b/production/get-aggregator.sh @@ -2,14 +2,14 @@ # if [ $# -ne 1 ]; then - echo USAGE: $0 env_file - exit 1 + echo USAGE: $0 env_file + exit 1 fi if [ ! -r "$1" ]; then - echo "$1" cannot be read - echo USAGE: $0 env_file - exit 1 + echo "$1" cannot be read + echo USAGE: $0 env_file + exit 1 fi pushd $( dirname $0 ) >/dev/null @@ -28,14 +28,38 @@ gitCache=$( fn-git-cache "$BUILD_ROOT" "${BRANCH}" ) aggDir=$( fn-git-dir "$gitCache" "$AGGREGATOR_REPO" ) if [ -r "$aggDir" ]; then - fn-git-clean-aggregator "$aggDir" "${BRANCH}" - pushd "$aggDir" - fn-git-pull - fn-git-submodule-update - popd + fn-git-clean-aggregator "$aggDir" "${BRANCH}" + RC=$? + if [[ $RC != 0 ]] + then + exit $RC + else + pushd "$aggDir" + fn-git-pull + RC=$? + if [[ $RC != 0 ]] + then + popd + exit $RC + else + fn-git-submodule-update + RC=$? + if [[ $RC != 0 ]] + then + popd + exit $RC + else + popd + fi + fi + fi else - fn-git-clone-aggregator "$gitCache" \ - $(fn-local-repo "$AGGREGATOR_REPO") "${BRANCH}" + fn-git-clone-aggregator "$gitCache" \ + $(fn-local-repo "$AGGREGATOR_REPO") "${BRANCH}" + if [[ $RC != 0 ]] + then + exit $RC + fi fi pushd "$aggDir" |