Skip to main content
summaryrefslogtreecommitdiffstats
blob: b8a48cb8a164de2bfeccdc3a7c39a149cf66b087 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/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" )
signingDir=$( fn-git-dir "$gitCache" "$SIGNING_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

echo "signingDir: $signingDir"

if [ -r "$signingDir" ]; then
	pushd "$signingDir"
	fn-git-clean
	fn-git-reset
	fn-git-checkout "$SIGNING_BRANCH"
	popd
else
	pushd "$gitCache"
	fn-git-clone $(fn-local-repo "$SIGNING_REPO") "$SIGNING_BRANCH"
	popd
	pushd "$signingDir"
	fn-git-checkout "$SIGNING_BRANCH"
	popd
fi

Back to the top