Last active
December 14, 2015 18:39
-
-
Save colinrymer/5131225 to your computer and use it in GitHub Desktop.
Get a list of installed homebrew formula with any options used to install them.
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 ruby | |
# | |
# Colin Rymer - 2013-03-10 | |
require 'json' | |
Dir.glob('/usr/local/Cellar/**/INSTALL_RECEIPT.json').each do |brew| | |
name = brew.split('/')[4] | |
receipt = JSON.load(File.open(brew)) | |
options = receipt['used_options'].join(' ') | |
puts "#{name} #{options unless options.empty?}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment