Created
June 2, 2017 22:07
-
-
Save theMadness/2f88819def701695ee4adb872f14f873 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
declare -r php_path=/usr/local/bin/php | |
if [ -h "$php_path" ] | |
then | |
[[ "$(readlink $php_path)" =~ /(php[0-9]{2})/ ]] && brew unlink ${BASH_REMATCH[1]} | |
else | |
echo "$php_path is not a symlink" | |
fi | |
valet stop | |
brew link php$1 | |
valet install | |
valet restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment