Created
October 8, 2015 17:56
-
-
Save RSully/28258330ec8eb1f2bb0b to your computer and use it in GitHub Desktop.
Generate commands to reinstall homebrew packages
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 | |
brew tap | while read tap; | |
do | |
echo "brew tap $tap" | |
done | |
brew list | while read formula; | |
do | |
options=$(brew info --json=v1 $formula | jq '.[0] .installed | sort_by(.version) [0] .used_options | join(" ")' -r) | |
echo "brew install $formula $options" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment