You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 5, 2021. It is now read-only.
# Setup Correct files depending on PHP installation version choice
10
10
if [ "$PHPINSTALLVERSION"= latest-7.1 ];then
11
11
cd ../releases/ ||exit
12
-
unzip php-src-php-7.1.32.zip -d latest-7.1
13
-
cd latest-7.1 ||exit
12
+
ls latest-7.1
13
+
ISFOLDERPRESENT=$?
14
+
if [ "$ISFOLDERPRESENT"= 1 ];then
15
+
unzip php-src-php-7.1.32.zip -d latest-7.1
16
+
cd latest-7.1 ||exit
17
+
elif [ "$ISFOLDERPRESENT"= 0 ];then
18
+
read -p 'There already is a folder with this version of PHP. Would you like to remove it?[default: n/N/y/Y] ' FOLDERCHOICE
19
+
FOLDERCHOICE=${FOLDERCHOICE:-n}
20
+
if [ "$FOLDERCHOICE"= y ] || [ "$FOLDERCHOICE"= Y ];then
21
+
sudo rm -r latest-7.1
22
+
unzip php-src-php-7.1.32.zip -d latest-7.1
23
+
cd latest-7.1 ||exit
24
+
elif [ "$FOLDERCHOICE"= n ] || [ "$FOLDERCHOICE"= N ];then
25
+
echo cancelling installation
26
+
setup
27
+
else
28
+
echo invalid argument, exiting...
29
+
setup
30
+
fi
31
+
fi
32
+
14
33
elif [ "$PHPINSTALLVERSION"= latest-7.2 ];then
15
34
cd ../releases/ ||exit
16
-
unzip php-src-php-7.2.33.zip -d latest-7.2
17
-
cd latest-7.2 ||exit
35
+
ls latest-7.2
36
+
ISFOLDERPRESENT=$?
37
+
if [ "$ISFOLDERPRESENT"= 1 ];then
38
+
unzip php-src-php-7.2.33.zip -d latest-7.2
39
+
cd latest-7.2 ||exit
40
+
elif [ "$ISFOLDERPRESENT"= 0 ];then
41
+
read -p 'There already is a folder with this version of PHP. Would you like to remove it?[default: n/N/y/Y] ' FOLDERCHOICE
42
+
FOLDERCHOICE=${FOLDERCHOICE:-n}
43
+
if [ "$FOLDERCHOICE"= y ] || [ "$FOLDERCHOICE"= Y ];then
44
+
sudo rm -r latest-7.2
45
+
unzip php-src-php-7.2.33.zip -d latest-7.2
46
+
cd latest-7.2 ||exit
47
+
elif [ "$FOLDERCHOICE"= n ] || [ "$FOLDERCHOICE"= N ];then
48
+
echo cancelling installation
49
+
setup
50
+
else
51
+
echo invalid argument, exiting...
52
+
setup
53
+
fi
54
+
fi
18
55
elif [ "$PHPINSTALLVERSION"= latest-7.3 ];then
19
56
cd ../releases/ ||exit
20
-
unzip php-src-php-7.3.22RC1.zip -d latest-7.3
21
-
cd latest-7.3 ||exit
57
+
ls latest-7.3
58
+
ISFOLDERPRESENT=$?
59
+
if [ "$ISFOLDERPRESENT"= 1 ];then
60
+
unzip php-src-php-7.3.22RC1.zip -d latest-7.3
61
+
cd latest-7.3 ||exit
62
+
elif [ "$ISFOLDERPRESENT"= 0 ];then
63
+
read -p 'There already is a folder with this version of PHP. Would you like to remove it?[default: n/N/y/Y] ' FOLDERCHOICE
64
+
FOLDERCHOICE=${FOLDERCHOICE:-n}
65
+
if [ "$FOLDERCHOICE"= y ] || [ "$FOLDERCHOICE"= Y ];then
66
+
sudo rm -r latest-7.3
67
+
unzip php-src-php-7.3.22RC1.zip -d latest-7.3
68
+
cd latest-7.3 ||exit
69
+
elif [ "$FOLDERCHOICE"= n ] || [ "$FOLDERCHOICE"= N ];then
70
+
echo cancelling installation
71
+
setup
72
+
else
73
+
echo invalid argument, exiting...
74
+
setup
75
+
fi
76
+
fi
22
77
elif [ "$PHPINSTALLVERSION"= latest-7.4 ];then
23
78
cd ../releases/ ||exit
24
-
unzip php-src-php-7.4.10RC1.zip -d latest-7.4
25
-
cd latest-7.4 ||exit
79
+
ls latest-7.4
80
+
ISFOLDERPRESENT=$?
81
+
if [ "$ISFOLDERPRESENT"= 1 ];then
82
+
unzip php-src-php-7.4.10RC1.zip -d latest-7.4
83
+
cd latest-7.4 ||exit
84
+
elif [ "$ISFOLDERPRESENT"= 0 ];then
85
+
read -p 'There already is a folder with this version of PHP. Would you like to remove it?[default: n/N/y/Y] ' FOLDERCHOICE
86
+
FOLDERCHOICE=${FOLDERCHOICE:-n}
87
+
if [ "$FOLDERCHOICE"= y ] || [ "$FOLDERCHOICE"= Y ];then
88
+
sudo rm -r latest-7.4
89
+
unzip php-src-php-7.4.10RC1.zip -d latest-7.4
90
+
cd latest-7.4 ||exit
91
+
elif [ "$FOLDERCHOICE"= n ] || [ "$FOLDERCHOICE"= N ];then
92
+
echo cancelling installation
93
+
setup
94
+
else
95
+
echo invalid argument, exiting...
96
+
setup
97
+
fi
98
+
fi
26
99
elif [ "$PHPINSTALLVERSION"= latest-8.0 ];then
27
-
read -p 'This a BETA PHP version. This software has been tested, but bugs and errors are bound to appear in this early stage. This should not be used in a production environment. Are you sure you want to install?[y/Y/default: n/N] ' INSTALLCHOICE
100
+
read -p 'This a BETA PHP version and. This software has been tested, but bugs and errors are bound to appear in this early stage. This should not be used in a production environment. Are you sure you want to install?[y/Y/default: n/N] ' INSTALLCHOICE
28
101
INSTALLCHOICE=${INSTALLCHOICE:-n}
29
102
30
103
if [ "$INSTALLCHOICE"= y ] || [ "$INSTALLCHOICE"= Y ];then
31
104
cd ../releases/ ||exit
32
-
unzip php-src-php-8.0.0beta2.zip -d latest-8.0
33
-
cd latest-8.0 ||exit
105
+
ls latest-8.0
106
+
ISFOLDERPRESENT=$?
107
+
if [ "$ISFOLDERPRESENT"= 1 ];then
108
+
unzip php-src-php-8.0.0beta2.zip -d latest-8.0
109
+
cd latest-8.0 ||exit
110
+
elif [ "$ISFOLDERPRESENT"= 0 ];then
111
+
read -p 'There already is a folder with this version of PHP. Would you like to remove it?[default: n/N/y/Y] ' FOLDERCHOICE
112
+
FOLDERCHOICE=${FOLDERCHOICE:-n}
113
+
if [ "$FOLDERCHOICE"= y ] || [ "$FOLDERCHOICE"= Y ];then
114
+
sudo rm -r latest-8.0
115
+
unzip php-src-php-8.0.0beta2.zip -d latest-8.0
116
+
cd latest-8.0 ||exit
117
+
elif [ "$FOLDERCHOICE"= n ] || [ "$FOLDERCHOICE"= N ];then
118
+
echo cancelling installation
119
+
setup
120
+
else
121
+
echo invalid argument, exiting...
122
+
setup
123
+
fi
34
124
elif [ "$INSTALLCHOICE"= n ] || [ "$INSTALLCHOICE"= N ];then
0 commit comments