diff options
| -rwxr-xr-x | install | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 |
