Last active
May 16, 2022 19:46
-
-
Save bshaffer/5f1fb63657e029056f38e416f5394fd3 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 | |
if [ "$1" = "" ] || [ "$2" != "" ]; then | |
echo "usage: phplink [version]" | |
exit | |
fi | |
if [ $(stat -f '%Su' /usr/local/bin/) != "$USER" ]; then | |
sudo chown $USER /usr/local/bin /usr/local/etc /usr/local/share/man /usr/local/share/man/* /usr/local/sbin /usr/local/share/doc | |
fi | |
brew unlink $(brew list | grep '^php@\d\.\d$') | |
brew link php@$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment