aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2013-10-29 15:58:52 -0400
committerMike McQuaid2013-10-29 15:58:52 -0400
commit8f718d658896a0896927c7b4873af0228ea2a5c4 (patch)
treec764692a0b623083bcd76b8351de4970fb0239b6
parent441f52fb65139fc7bd656a2a9f6d5ac380c31e41 (diff)
downloadhomebrew-8f718d658896a0896927c7b4873af0228ea2a5c4.tar.bz2
Improve Mavericks CLT installation usability.
* Install before Git is used. * Warn about the GUI popup. * Block on user input until installation finishes.
-rwxr-xr-xinstall16
1 files changed, 10 insertions, 6 deletions
diff --git a/install b/install
index 4b3d45b99..554d29afc 100755
--- a/install
+++ b/install
@@ -148,6 +148,15 @@ else
sudo "/usr/bin/chgrp admin #{HOMEBREW_PREFIX}"
end
+if macos_version > "10.8"
+ unless File.exist? "/Library/Developer/CommandLineTools/usr/bin/clang"
+ ohai "Installing the Command Line Tools (expect a GUI popup):"
+ sudo "/usr/bin/xcode-select", "--install"
+ puts "Press any key when the installation has completed."
+ getc
+ end
+end
+
ohai "Downloading and installing Homebrew..."
Dir.chdir HOMEBREW_PREFIX do
if git
@@ -172,12 +181,7 @@ end
warn "#{HOMEBREW_PREFIX}/bin is not in your PATH." unless ENV['PATH'].split(':').include? "#{HOMEBREW_PREFIX}/bin"
-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"
+if macos_version < "10.9" and 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