Last active
August 23, 2022 08:34
-
-
Save siketyan/d4aaea081101031b16a631186d6e2ee7 to your computer and use it in GitHub Desktop.
Easy alternative of anyenv or asdf for Homebrew formulas
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
#!/usr/bin/env/sh | |
# | |
# Usage: | |
# ./pot.sh php @8.0 # Uses specified version (8.0 in this case) | |
# ./pot.sh php # Uses default version (8.1 at 20/05/2022) | |
# | |
brew list | grep "$1@" | xargs brew unlink "$1"; brew link --force --overwrite "$1$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment