-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh
45 lines (41 loc) · 876 Bytes
/
bootstrap.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
#!/usr/bin/env bash
# Sparse Checkout Repository
DOMAIN=$1
case ${DOMAIN} in
"app")
DIRECTORIES="docs/ applications/ components/ configs/ libraries/ plugins/"
;;
"ci")
DIRECTORIES="docs/ .github/ ci/"
;;
"service")
DIRECTORIES="docs/ configs/ libraries/ plugins/ services/"
;;
"help")
echo "Available domains:"
DOMAINS=(
app
ci
service
)
DESCRIPTIONS=(
"Frontend Applications"
"Continuous Integration Configuration and Scripts"
"Deployable Services"
)
for i in ${!DOMAINS[@]}
do
printf " \\e[36m%s\\e[0m - %s\\n" "${DOMAINS[$i]}" "${DESCRIPTIONS[$i]}"
done
exit 1
;;
*)
echo "Domain \"${1}\" doesn't exist."
./${0} "help"
exit 1
;;
esac
echo "Running 'git sparse-checkout init --cone'"
git sparse-checkout init --cone
echo "Running 'git sparse-checkout set ${DIRECTORIES}'"
git sparse-checkout set ${DIRECTORIES}