From 6661f78618a640ac9570f2003df5c359d1027579 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 10 Aug 2009 11:45:25 +0100 Subject: [PATCH] Allow skip_clean? to skip entire directories Speeds up Python formula plenty in clean phase --- Library/Homebrew/brew.h.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 842439a8c2..f3dee102aa 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -238,7 +238,9 @@ private def clean_dir d d.find do |path| - if not path.file? + if path.directory? + Find.prune if @f.skip_clean? path + elsif not path.file? next elsif path.extname == '.la' and not @f.skip_clean? path # *.la files are stupid