-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·75 lines (60 loc) · 1.6 KB
/
setup.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
source "$(dirname $0)/util/defaults.sh"
# Load OS information
load_os_information
load_environment_variables
load_shell_properties
function help_content() {
cat <<-EOF
========================================================
OS TYPE: $os_type
OS VARIANT: $os_variant
========================================================
===================== SHELL-ASSIST =====================
usage: ./setup [-h] [--help]
options:
--help, -h, help: Get help content
-------------------------------------------------------
alias: Setup shell alias usage
usage: ./setup alias
-------------------------------------------------------
certificate: Setup self signed certificate
usage: ./setup certificate
-------------------------------------------------------
docker: Setup docker environment
usage: ./setup docker
-------------------------------------------------------
kubernetes: Setup kubernetes environment
usage: ./setup kubernetes
EOF
}
case $1 in
"alias")
echo "starting alias setup..."
setup_alias="$(dirname $0)/common/setup-alias.sh"
if [ -f $setup_alias ]; then
source $setup_alias
register_profile_alias
fi
;;
"docker")
echo "Starting docker setup..."
;;
"cert")
echo "Starting self signed certificate setup..."
certificate="$(dirname $0)/certificate/setup.sh"
if [ -f $certificate ]; then source $certificate && setup_certificate; fi
;;
"dev")
echo "Starting development work station setup..."
;;
"kubernetes")
echo "Starting kubernetes setup..."
;;
"-h" | "--help" | "help")
help_content
;;
*)
help_content
;;
esac