aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-03-07 20:44:19 -0500
committerMike McQuaid2012-03-10 18:09:35 +1300
commit4a306f32f468a0dfb1cd0faad861b3773babfa33 (patch)
treef9ba847c6b4bc1b1d8ff4247a625df10d8c6b1db /Library/Homebrew/formula.rb
parent22f908d5206bbc4184ec7686593f1f04b9c9ff2f (diff)
downloadbrew-4a306f32f468a0dfb1cd0faad861b3773babfa33.tar.bz2
Support bottles for non-Lion OSX versions.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index eb3cd7b2e..b3623b336 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -64,6 +64,13 @@ class Formula
return false
end
+ def bottle_for_current_osx_version?
+ return true if /#{MacOS.cat}\.bottle\.tar\.gz$/.match(bottle_url)
+ # old brew bottle style
+ return true if MacOS.lion? && /-bottle\.tar\.gz$/.match(bottle_url)
+ return false
+ end
+
def bottle_up_to_date?
!bottle_url.nil? && Pathname.new(bottle_url).version == version
end