From 985030ad82fe94d51a1a4e96a51a62fa7c543c7f Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 22 May 2009 16:20:27 +0100 Subject: [PATCH] Fix prune Don't prune everything! Also added count puts --- Cellar/homebrew/brew | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Cellar/homebrew/brew b/Cellar/homebrew/brew index 184d9f9eb5..aac8257087 100755 --- a/Cellar/homebrew/brew +++ b/Cellar/homebrew/brew @@ -6,14 +6,27 @@ require 'pathname' $root = Pathname.new(__FILE__).realpath.dirname.parent.parent def prune + n=0 + dirs=Array.new $root.find do |path| if path.directory? - name=path.basename - Find.prune if name == 'Cellar' or name == 'Formula' + name=path.relative_path_from($root).to_s + if name == '.git' or name == 'Cellar' or name == 'Formula' + Find.prune + else + dirs<