Skip to content

Instantly share code, notes, and snippets.

@windwiny
Created March 3, 2013 08:15
Show Gist options
  • Save windwiny/5075292 to your computer and use it in GitHub Desktop.
Save windwiny/5075292 to your computer and use it in GitHub Desktop.
# show brew install program info. # independence missing ..
#!/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