Install PHP only if not found and support 7.4.0RC2

This commit is contained in:
Shivam Mathur
2019-09-17 20:40:27 +05:30
parent 69f9b777e1
commit a398f54da4
6 changed files with 69 additions and 43 deletions

View File

@ -1,8 +1,11 @@
echo $1
brew unlink php
brew tap exolnet/homebrew-deprecated
brew install php@$1
brew link --force --overwrite php@$1
version=$(php-config --version | cut -c 1-3)
if [ "$version" != "$1" ]; then
brew tap exolnet/homebrew-deprecated;
brew unlink php;
brew install php@$1;
brew link --force --overwrite php@$1;
fi
curl -sS https://getcomposer.org/installer | php
chmod +x composer.phar
mv composer.phar /usr/local/bin/composer