-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.sh
54 lines (47 loc) · 1.03 KB
/
helpers.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
#!/usr/bin/env bash
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
yellow="\033[0;33m"
yellowb="\033[1;33m"
blue="\033[0;34m"
blueb="\033[1;34m"
purple="\033[0;35m"
purpleb="\033[1;35m"
lightblue="\033[0;36m"
lightblueb="\033[1;36m"
# Check local requirements (binaries used during the installation process)
function check_local_requirements {
deps=( gcloud kubectl kops k9s curl getmesh )
for dep in "${deps[@]}"
do
if ! command -v ${dep} &> /dev/null
then
echo "${dep} could not be found, please install this on your local system first"
exit
fi
done
}
# Print info messages
function print_info {
echo -e "${greenb}${1}${end}"
}
# Print warning messages
function print_warning {
echo -e "${yellowb}${1}${end}"
}
# Print error messages
function print_error {
echo -e "${redb}${1}${end}"
}
# Print command messages
function print_command {
echo -e "${lightblueb}${1}${end}"
}