mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-12-02 13:39:47 -05:00
brew depstree: shows a tree of dependencies for a formula
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
1 parent
9d7d056c2d
commit
4e16c6026b
1 file changed
+21
+21
@@ -0,0 +1,21 @@
|
||||
require 'formula'
|
||||
|
||||
module Homebrew extend self
|
||||
def depstree
|
||||
ARGV.formulae.each do |f|
|
||||
puts f
|
||||
recursive_deps_tree(f, 1)
|
||||
puts
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def recursive_deps_tree(formula, level)
|
||||
formula.deps.each do |dep|
|
||||
puts "> "*level+dep
|
||||
recursive_deps_tree(Formula.factory(dep), level+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Homebrew.depstree
|
||||
Reference in new issue
Block a user