forked from nerdeveloper/stacks
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·143 lines (137 loc) · 4.2 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·143 lines (137 loc) · 4.2 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[40;38;5;82m'
PURPLE='\033[0;35m'
echo "+-+-+-+-+-+-+
|S|t|a|c|k|s|
+-+-+-+-+-+-+"
checkOS () {
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
*) machine="UNKNOWN:${unameOut}"
esac
}
PS3='Please enter your choice or enter "11" to quit: '
options=("LAMP" "LNMP" "MAMP" "MEAN" "MNMP" "MERN" "MEVN" "PEAN" "PERN" "DOCKER" "Quit")
select opt in "${options[@]}"
do
case $opt in
"LAMP")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
./$opt/install.sh
;;
"LNMP")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
./$opt/install.sh
;;
"MAMP")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
./$opt/install.sh
;;
"MEAN")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
./$opt/mac.sh
elif [ "$machine" == "Linux" ]; then
./$opt/linux.sh
else
echo "Stacks has no support for your Operating System."
fi
;;
"MNMP")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
./$opt/install.sh
;;
"MERN")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
./$opt/mac.sh
elif [ "$machine" == "Linux" ]; then
./$opt/linux.sh
else
echo "Stacks has no support for your Operating System."
fi
;;
"MEVN")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
./$opt/mac.sh
elif [ "$machine" == "Linux" ]; then
./$opt/linux.sh
else
echo "Stacks has no support for your Operating System."
fi
;;
"PEAN")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
./$opt/mac.sh
elif [ "$machine" == "Linux" ]; then
./$opt/linux.sh
else
echo "Stacks has no support for your Operating System."
fi
;;
"PERN")
echo "you chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt"
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
./$opt/mac.sh
elif [ "$machine" == "Linux" ]; then
./$opt/linux.sh
else
echo "Stacks has no support for your Operating System."
fi
;;
"DOCKER")
echo "You chose choice $REPLY which is $opt"
sleep 1
echo "Please wait while we install $opt..."
sleep 1
checkOS
if [ "$machine" == "Mac" ]; then
echo -e " ${RED}Stacks has no support for your Mac OSX Operating System."
elif [ "$machine" == "Linux" ]; then
./$opt/install.sh
else
echo -e " ${RED} Stacks has no support for your Operating System."
fi
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done