-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdeploy-bonsai.sh
executable file
·46 lines (40 loc) · 1.13 KB
/
deploy-bonsai.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
#!/bin/bash
GREEN='\033[0;32m'
LB='\033[1;34m' # light blue
NC='\033[0m' # No Color
# get start timestamp
res1=$(date +%s)
# deploy things
./1-deploy-multipass-vms.sh
./2-deploy-k3s.sh
./9-install-metal-lb.sh
./11-deploy-ingress-nginx.sh
# get end timestamp
res2=$(date +%s)
# calculate runtime
dt=$(echo "$res2 - $res1" | bc)
dd=$(echo "$dt/86400" | bc)
dt2=$(echo "$dt-86400*$dd" | bc)
dh=$(echo "$dt2/3600" | bc)
dt3=$(echo "$dt2-3600*$dh" | bc)
dm=$(echo "$dt3/60" | bc)
ds=$(echo "$dt3-60*$dm" | bc)
echo "############################################################################"
echo -e "${GREEN}FINISHED${NC}"
echo -e '
,.,
MMMM_ ,..,
"_ "__"MMMMM ,...,,
,..., __." --" ,., _-"MMMMMMM
MMMMMM"___ "_._ MMM"_."" _ """"""
""""" "" , \_. "_. ."
,., _"__ \__./ ."
MMMMM_" "_ ./
'''' ( )
._______________.-`____`---._.
\ /
\________________________/
(_) (_)
'
printf "${GREEN}Total runtime in minutes was: %02d:%02.f\n${NC}" $dm $ds
echo "############################################################################"