-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
executable file
·70 lines (60 loc) · 1.4 KB
/
provision.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
#!/usr/bin/env bash
PS3='Welches Tool verwendest Du: '
tools=("Lando" "DDev")
select tool in "${tools[@]}"
do
case $tool in
"Lando")
USED_TOOL=lando
break;
;;
"DDev")
USED_TOOL=ddev
break;
;;
esac
done
PS3='Von welchem System sollen die Daten geholt werden: '
options=("Staging (nur Datenabgleich)" "Staging (komplett)" "Produktion (nur Datenabgleich)" "Produktion (komplett)" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Staging (nur Datenabgleich)")
INSTALL=0
TYPE=staging
break
;;
"Staging (komplett)")
INSTALL=1
TYPE=staging
break
;;
"Produktion (nur Datenabgleich)")
INSTALL=0
TYPE=prod
break
;;
"Produktion (komplett)")
INSTALL=1
TYPE=prod
break
;;
"Quit")
QUIT=1;
break
;;
*) echo "invalid option $REPLY";;
esac
done
if [ "$QUIT" = 1 ]; then
exit
fi;
if [ "$INSTALL" = 1 ]; then
composer install
npm -s install
bower install
gulp build
fi
$USED_TOOL drush --yes sql-drop -y
$USED_TOOL drush --yes sql-sync @lando.$TYPE @self
$USED_TOOL drush --yes rsync @lando.$TYPE:%files @self:%files