diff options
author | Paul Webster | 2012-11-15 18:29:10 +0000 |
---|---|---|
committer | Thanh Ha | 2012-12-07 15:46:24 +0000 |
commit | c4ed96c38e9a7299229a596ab45915c47720d16a (patch) | |
tree | 23f31fddc334569b8445653ffa97aac64d24cc02 /scripts/get-aggregator.sh | |
parent | 524f66942795644ec4a2deb2b425dd5f6d46d114 (diff) | |
download | eclipse.platform.releng.aggregator-c4ed96c38e9a7299229a596ab45915c47720d16a.tar.gz eclipse.platform.releng.aggregator-c4ed96c38e9a7299229a596ab45915c47720d16a.tar.xz eclipse.platform.releng.aggregator-c4ed96c38e9a7299229a596ab45915c47720d16a.zip |
Bug 393923 - [CBI] clone the aggregator to run the build
Provide a get-aggregator.sh script
Diffstat (limited to 'scripts/get-aggregator.sh')
-rw-r--r-- | scripts/get-aggregator.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/get-aggregator.sh b/scripts/get-aggregator.sh new file mode 100644 index 000000000..c4fbb58f4 --- /dev/null +++ b/scripts/get-aggregator.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# + +if [ $# -ne 1 ]; then + echo USAGE: $0 env_file + exit 1 +fi + +if [ ! -r "$1" ]; then + echo "$1" cannot be read + echo USAGE: $0 env_file + exit 1 +fi + +pushd $( dirname $0 ) >/dev/null +SCRIPT_PATH=$(pwd) +popd >/dev/null + +. $SCRIPT_PATH/build-functions.sh + +. "$1" + + +cd $BUILD_ROOT + +# derived values +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 +else + fn-git-clone-aggregator "$gitCache" \ + $(fn-local-repo "$AGGREGATOR_REPO") "$BRANCH" +fi + |