diff options
| author | Max Howell | 2009-12-04 10:46:04 +0000 |
|---|---|---|
| committer | Max Howell | 2009-12-04 14:16:45 +0000 |
| commit | 0cb915e34e4896f771e95eadf07920befacd5b14 (patch) | |
| tree | 02627b8986a43faf941d2ad47581c5180527d6cd /Library | |
| parent | bf07b9662a9e57226d669530955ec23f9ff85a60 (diff) | |
| download | brew-0cb915e34e4896f771e95eadf07920befacd5b14.tar.bz2 | |
Allow formula to skip docs removal
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.h.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 3e23988ab..400602ad4 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 |
