forked from DoDGOSS/ozp-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.sh
55 lines (42 loc) · 2.11 KB
/
checkout.sh
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
#!/usr/bin/env bash
SCRIPT_DIR=$(dirname $0)
source ${SCRIPT_DIR}/common.sh
REPOSITORY=""
function checkout() {
local name="$1"
local repository="$2"
local branch_or_commit="$3"
if [ -d "$name" ]; then
printf "'$name' already exists; skipping...\n"
else
printf "Checking out '$name'... "
git clone --quiet "$repository" "$name"
if [ ! -z "$branch_or_commit" ]; then
pushd "$name"
git checkout --quiet "$branch_or_commit"
popd
fi
printf "Done!\n"
fi
}
pushd src
print_bold "Checking out repositories...\n"
checkout ozp-backend "$REPOSITORY/ozp-backend.git" release/rc2
checkout ozp-bootstrap-classify "$REPOSITORY/ozp-bootstrap-classify.git" release/rc2
checkout ozp-bootstrap-sass "$REPOSITORY/ozp-bootstrap-sass.git" release/rc2
checkout ozp-bootstrap-tour "$REPOSITORY/ozp-bootstrap-tour.git" release/rc2
checkout ozp-center "$REPOSITORY/ozp-center.git" release/rc2
checkout ozp-classification "$REPOSITORY/ozp-classification.git" release/rc2
checkout ozp-data-schemas "$REPOSITORY/ozp-data-schemas.git" release/rc2
checkout ozp-demo-apps "$REPOSITORY/ozp-demo-apps.git" release/rc2
checkout ozp-demo-auth-service "$REPOSITORY/ozp-demo-auth-service.git" release/rc2
checkout ozp-hud "$REPOSITORY/ozp-hud.git" release/rc2
checkout ozp-icons "$REPOSITORY/ozp-icons.git" release/rc2
checkout ozp-iwc "$REPOSITORY/ozp-iwc.git" release/rc2
checkout ozp-react-commons "$REPOSITORY/ozp-react-commons.git" release/rc2
checkout ozp-react-select-box "$REPOSITORY/ozp-react-select-box.git" release/rc2
checkout ozp-sweetalert "$REPOSITORY/ozp-sweetalert.git" release/rc2
checkout ozp-ubuntu-fontface "$REPOSITORY/ozp-ubuntu-fontface.git" release/rc2
checkout ozp-w2ui "$REPOSITORY/ozp-w2ui.git" release/rc2
checkout ozp-webtop "$REPOSITORY/ozp-webtop.git" release/rc2
popd