Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 7f6a628

Browse files
author
Antonios Papadakis
committed
Various Syntax and Best Practice Fixes
macOS
1 parent cc25837 commit 7f6a628

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

macos/install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function compilePHP {
44
# Install All Dependencies
5-
read -p 'Which PHP version would you like to install?[latest-7.1/latest-7.2/latest-7.3/latest-7.4/latest-8.0/latest-master] ' PHPINSTALLVERSION
5+
read -pr 'Which PHP version would you like to install?[latest-7.1/latest-7.2/latest-7.3/latest-7.4/latest-8.0/latest-master] ' PHPINSTALLVERSION
66

77
if [ "$PHPINSTALLVERSION" = latest-7.1 ]; then
88
cd ../releases/ || exit
@@ -21,7 +21,7 @@ function compilePHP {
2121
unzip php-src-php-7.4.10RC1.zip -d latest-7.4
2222
cd latest-7.4 || exit
2323
elif [ "$PHPINSTALLVERSION" = latest-8.0 ]; then
24-
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/n/N] ' INSTALLCHOICE
24+
read -pr '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/n/N] ' INSTALLCHOICE
2525
if [ "$INSTALLCHOICE" = y ] || [ "$INSTALLCHOICE" = Y ]; then
2626
cd ../releases/ || exit
2727
unzip php-src-php-8.0.0beta2.zip -d latest-8.0
@@ -34,7 +34,7 @@ function compilePHP {
3434
exit 1
3535
fi
3636
elif [ "$PHPINSTALLVERSION" = latest-master ]; then
37-
read -p 'CAREFUL: This is a pre-release version and is in heavy development. Install this only if you want the latest bleeding-edge features. These may not have been tested thoroughly and should not be used in a production environment. Are you sure you want to install?[y/Y/n/N] ' INSTALLCHOICE
37+
read -pr 'CAREFUL: This is a pre-release version and is in heavy development. Install this only if you want the latest bleeding-edge features. These may not have been tested thoroughly and should not be used in a production environment. Are you sure you want to install?[y/Y/n/N] ' INSTALLCHOICE
3838
if [ "$INSTALLCHOICE" = y ] || [ "$INSTALLCHOICE" = Y ]; then
3939
git checkout php-src
4040
elif [ "$INSTALLCHOICE" = n ] || [ "$INSTALLCHOICE" = N ]; then
@@ -49,7 +49,7 @@ function compilePHP {
4949
echo Installing Dependencies
5050
brew install flex autoconf automake libtool re2c bison openssl curl enchant gd freetype mhash libiconv libsodium libjpeg pcre libxml2 argon2 tidy-html5 libzip
5151
# Export Packages to the $PATH so They can be Found by the System
52-
sudo echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
52+
sudo echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' | sudo tee ~/.bash_profile
5353
source ~/.bash_profile
5454
echo Installed all Dependencies
5555
# Build the Configure Script
@@ -108,7 +108,7 @@ function compilePHP {
108108
fi
109109

110110
echo Tested PHP
111-
read -p 'The tests have been completed and you may or may not have had failures on some of them. This can sometimes be ignored with the latest builds, or may need extra attention. Would you like to continue with installation?[y/Y/n/N] ' ERRORRESPONSE
111+
read -pr 'The tests have been completed and you may or may not have had failures on some of them. This can sometimes be ignored with the latest builds, or may need extra attention. Would you like to continue with installation?[y/Y/n/N] ' ERRORRESPONSE
112112
if [ "$ERRORRESPONSE" = y ] || [ "$ERRORRESPONSE" = Y ]; then
113113
echo Installing PHP-CLI
114114
sudo make install || exit
@@ -123,7 +123,7 @@ function compilePHP {
123123
}
124124

125125
brew help
126-
BREWCHECK=$(echo $?)
126+
BREWCHECK=$?
127127

128128
if [ "$BREWCHECK" = 0 ]; then
129129
compilePHP

0 commit comments

Comments
 (0)