aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall11
1 files changed, 8 insertions, 3 deletions
diff --git a/install b/install
index d46733482..64155e9f8 100755
--- a/install
+++ b/install
@@ -172,12 +172,17 @@ end
warn "#{HOMEBREW_PREFIX}/bin is not in your PATH." unless ENV['PATH'].split(':').include? "#{HOMEBREW_PREFIX}/bin"
-if macos_version < 10.7
- warn "Now install Xcode: https://developer.apple.com/xcode/" unless File.exist? "/usr/bin/cc"
-else
+if macos_version > 10.8
+ unless File.exist? "/Library/Developer/CommandLineTools/usr/bin/clang"
+ ohai "Installing the Command Line Tools:"
+ sudo "/usr/bin/xcode-select", "--install"
+ end
+elsif macos_version > 10.6
`/usr/bin/cc --version 2> /dev/null` =~ %r[clang-(\d{2,})]
version = $1.to_i
warn %{Install the "Command Line Tools for Xcode": http://connect.apple.com} if version < 425
+else
+ warn "Now install Xcode: https://developer.apple.com/xcode/" unless File.exist? "/usr/bin/cc"
end
ohai "Installation successful!"