forked from LandRegistry/common-dev-env
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·57 lines (52 loc) · 1.51 KB
/
run.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
command="$1"
if [ "$command" = "up" ]
then
echo -e "\e[36mBeginning UP\e[0m"
ruby logic.rb check-for-update &&
ruby logic.rb prep &&
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
ruby logic.rb start &&
source scripts/after-ups.sh &&
source scripts/add-aliases.sh
fi
if [ "$command" = "halt" ]
then
echo -e "\e[36mBeginning HALT\e[0m"
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
ruby logic.rb stop &&
source scripts/add-aliases.sh &&
source scripts/remove-aliases.sh
fi
if [ "$command" = "reload" ]
then
echo -e "\e[36mBeginning RELOAD\e[0m"
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
ruby logic.rb stop &&
ruby logic.rb prep &&
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
ruby logic.rb start &&
source scripts/after-ups.sh &&
source scripts/add-aliases.sh
fi
if [ "$command" = "destroy" ]
then
echo -e "\e[36mBeginning DESTROY\e[0m"
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
ruby logic.rb reset &&
export COMPOSE_FILE= &&
export COMPOSE_PROJECT_NAME= &&
source scripts/add-aliases.sh &&
source scripts/remove-aliases.sh
fi
if [ "$command" = "repair" ]
then
echo -e "\e[36mBeginning REPAIR\e[0m"
ruby logic.rb prepare-compose-environment &&
source scripts/prepare-docker.sh &&
source scripts/add-aliases.sh
fi