Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Webster2012-11-15 18:29:10 +0000
committerThanh Ha2012-12-07 15:46:24 +0000
commitc4ed96c38e9a7299229a596ab45915c47720d16a (patch)
tree23f31fddc334569b8445653ffa97aac64d24cc02 /scripts/get-aggregator.sh
parent524f66942795644ec4a2deb2b425dd5f6d46d114 (diff)
downloadeclipse.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.sh40
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
+

Back to the top