Optimize installation scripts

This commit is contained in:
Shivam Mathur
2019-09-21 21:36:03 +05:30
parent 585f7a1fd2
commit 9cfe4e665e
3208 changed files with 83 additions and 198512 deletions

View File

@ -1,12 +1,12 @@
version=$(php-config --version | cut -c 1-3)
if [ "$version" != "$1" ]; then
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew tap exolnet/homebrew-deprecated;
brew tap exolnet/homebrew-deprecated > /dev/null 2>&1;
brew unlink php;
brew install php@"$1";
brew link --force --overwrite php@"$1";
else
sudo cp /etc/php.ini.default /etc/php.ini
sudo cp /etc/php.ini.default /etc/php.ini
fi
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
ext_dir=$(/usr/bin/php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||")