aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-25 15:53:39 -0700
committerAdam Vandenberg2010-08-07 18:08:52 -0700
commitdc49a5fa6ab10ecdb21061aa1b2f9ef68f91cfdd (patch)
tree0f72994f10f7cad4f85e2e5c919f1ab63ba4bab2 /Library
parent9f58ebf25d518bf1d91174e31187d1ecd3ec116e (diff)
downloadhomebrew-dc49a5fa6ab10ecdb21061aa1b2f9ef68f91cfdd.tar.bz2
Add 'skip_clean :all' to the DSL.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 81b139e8e..9efd32550 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -172,6 +172,7 @@ class Formula
# skip_clean [bin+"foo", lib+"bar"]
# redefining skip_clean? in formulas is now deprecated
def skip_clean? path
+ return true if @skip_clean_all
to_check = path.relative_path_from(prefix).to_s
self.class.skip_clean_paths.include? to_check
end
@@ -479,7 +480,8 @@ EOF
end
end
- attr_rw :version, :homepage, :specs, :deps, :external_deps, :keg_only_reason
+ attr_rw :version, :homepage, :specs, :deps, :external_deps
+ attr_rw :keg_only_reason, :skip_clean_all
attr_rw *CHECKSUM_TYPES
def head val=nil, specs=nil
@@ -520,6 +522,10 @@ EOF
end
def skip_clean paths
+ if paths == :all
+ @skip_clean_all = true
+ return
+ end
@skip_clean_paths ||= []
[paths].flatten.each do |p|
@skip_clean_paths << p.to_s unless @skip_clean_paths.include? p.to_s