From 0cb915e34e4896f771e95eadf07920befacd5b14 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 4 Dec 2009 10:46:04 +0000 Subject: [PATCH] Allow formula to skip docs removal --- Library/Homebrew/brew.h.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 3e23988abc..400602ad41 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -383,11 +383,11 @@ class Cleaner # you can read all of this stuff online nowadays, save the space # info pages are pants, everyone agrees apart from Richard Stallman # feel free to ask for build options though! http://bit.ly/Homebrew - (f.prefix+'share'+'doc').rmtree rescue nil - (f.prefix+'share'+'info').rmtree rescue nil - (f.prefix+'doc').rmtree rescue nil - (f.prefix+'docs').rmtree rescue nil - (f.prefix+'info').rmtree rescue nil + unlink = Proc.new{ |path| path.unlink unless f.skip_clean? path rescue nil } + %w[doc docs info].each do |fn| + unlink.call(f.share+fn) + unlink.call(f.prefix+fn) + end end private