aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-12-04 10:46:04 +0000
committerMax Howell2009-12-04 14:16:45 +0000
commit23a71de7d6d5f613f0df4031acead87cfb29c1a0 (patch)
treecdc4d62b1d522ae8590975e3a05f7a9f0cebcdac /Library
parentc400a9f6caa79b39c9c6f92532ffede558d3333a (diff)
downloadhomebrew-23a71de7d6d5f613f0df4031acead87cfb29c1a0.tar.bz2
Allow formula to skip docs removal
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb10
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