Created
March 3, 2013 08:15
-
-
Save windwiny/5075292 to your computer and use it in GitHub Desktop.
# show brew install program info.
# independence missing ..
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 | |
# show brew install program info. | |
# independence missing .. | |
pgs = %x{brew list}.split | |
deps = [] | |
depss = [] | |
pgs.each do |pg| | |
d = %x{brew deps --1 #{pg}}.split | |
deps << d | |
depss << [pg, d] | |
end | |
pgs.sort! | |
deps.flatten!.sort!.uniq! | |
depss.sort! | |
indep = pgs - deps | |
mis = deps - pgs | |
p "SUMMARY: pgs: #{pgs.size} independence: #{indep.size} miss: #{mis.size}" | |
p '---- independence program ----' | |
p indep | |
p '---- missing program ----' | |
p mis | |
p '------- all program and deps -------' | |
depss.each {|x| p x} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment