Created
August 15, 2014 21:39
-
-
Save dsasser/48b824ccfdd9b45d3f67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#switch to using a different version of php | |
#rm /usr/local/php5 | |
PHP53="php5-5.3.28-20140112-174528" | |
PHP55="php5-5.5.14-20140628-105310" | |
ROOT_PATH="/usr/local" | |
switch () { | |
rm $ROOT_PATH/php5 | |
ln -s $ROOT_PATH/$VER /usr/local/php5 | |
php -v | |
sudo apachectl start | |
mysql.server start | |
} | |
if [[ $1 = '5' ]]; then | |
VER=$PHP55 | |
switch $1 VER | |
fi | |
if [[ $1 = '3' ]]; then | |
VER=$PHP53 | |
switch $1 VER | |
fi | |
if [[ $1 = '2' ]]; then | |
sudo apachectl stop | |
mysql.server stop | |
sudo /Applications/MAMP/bin/start.sh 2&>1 | |
rm $ROOT_PATH/php5 | |
ln -s /Applications/MAMP/bin/php/php5.2.17 /usr/local/php5 | |
php -v | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment