diff options
| author | Max Howell | 2012-08-17 17:18:17 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-17 17:18:17 -0400 |
| commit | 547ca0a8d112db9db40dc567ae025b0528f9a0ab (patch) | |
| tree | 71428771d00825db8df6f7da4cacde8904f55f25 /Library/Homebrew/macos/xcode.rb | |
| parent | cac059e18507eaa23a74048b3d78d99472e8707d (diff) | |
| download | homebrew-547ca0a8d112db9db40dc567ae025b0528f9a0ab.tar.bz2 | |
Stop warning about CLT w/o Xcode
Also made the latest_versions checks smarter. Hopefully correct too.
Diffstat (limited to 'Library/Homebrew/macos/xcode.rb')
| -rw-r--r-- | Library/Homebrew/macos/xcode.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/macos/xcode.rb b/Library/Homebrew/macos/xcode.rb index 0eda90e57..28d3aff66 100644 --- a/Library/Homebrew/macos/xcode.rb +++ b/Library/Homebrew/macos/xcode.rb @@ -16,6 +16,19 @@ module MacOS::Xcode extend self folder == "/" end + def latest_version + case MacOS.version + when 10.5 then "3.1.4" + when 10.6 then "3.2.6" + else + if MacOS.version >= 10.7 + "4.4.1" + else + raise "Mac OS X `#{MacOS.version}' is invalid" + end + end + end + def prefix @prefix ||= begin path = Pathname.new folder @@ -144,6 +157,11 @@ module MacOS::CLT extend self MacOS.dev_tools_path == Pathname.new("/usr/bin") end + def latest_version? + `/usr/bin/clang -v` =~ %r{tags/Apple/clang-(\d+).(\d+).(\d+)} + $1 >= 421 and $3 >= 57 + end + def version # Version string (a pretty damn long one) of the CLT package. # Note, that different ways to install the CLTs lead to different |
