Last active
June 4, 2018 08:53
-
-
Save isindir/f4563ec55748b27e897331b46efd2a7b 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
#!/usr/bin/env bash | |
# Switch to any version of the Formula | |
APP=$1 | |
VER=$2 | |
brew info $APP | |
GITSHA=$( curl -s "https://github.com/Homebrew/homebrew-core/commits/master/Formula/$APP.rb" \ | |
| grep "$VER bottle" \ | |
| sed -e 's/^.*href="\(.*\)#diff.*$/\1/; | |
s/^.*\///') | |
brew unlink $APP | |
brew install "https://raw.githubusercontent.com/Homebrew/homebrew-core/$GITSHA/Formula/$APP.rb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment