aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2013-10-23 17:44:43 +0100
committerMike McQuaid2013-10-23 17:44:43 +0100
commit9ebc527e49e531a240aa628659b00df56158ebf7 (patch)
tree5a984e7278cda9a05f8e13b9e49b75bc9a13cfce /Library/Homebrew/cmd
parent3fb38ea69eedce9c24b264b0c3218ad7cd78746f (diff)
downloadbrew-9ebc527e49e531a240aa628659b00df56158ebf7.tar.bz2
Improve Xcode and CLT installation instructions.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb62
1 files changed, 48 insertions, 14 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 059e6f284..47ad62027 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -193,34 +193,68 @@ end
def check_xcode_clt
if MacOS::Xcode.installed?
__check_xcode_up_to_date
- elsif MacOS.version >= "10.7"
+ elsif MacOS.version >= :lion
__check_clt_up_to_date
else <<-EOS.undent
- Xcode not installed
- Most stuff needs Xcode to build: http://developer.apple.com/xcode/
+ Xcode is not installed
+ Most formulae need Xcode to build.
+ It can be installed from https://developer.apple.com/downloads/
EOS
end
end
def __check_xcode_up_to_date
- if MacOS::Xcode.outdated? then <<-EOS.undent
- Your Xcode (#{MacOS::Xcode.version}) is outdated
- Please install Xcode #{MacOS::Xcode.latest_version}.
+ if MacOS::Xcode.outdated?
+ message = <<-EOS.undent
+ Your Xcode (#{MacOS::Xcode.version}) is outdated
+ Please update to Xcode #{MacOS::Xcode.latest_version}.
EOS
+ if MacOS.version >= :lion
+ message += <<-EOS.undent
+ Xcode can be updated from the App Store.
+ EOS
+ else
+ message += <<-EOS.undent
+ Xcode can be updated from https://developer.apple.com/downloads/
+ EOS
+ end
+ message
end
end
def __check_clt_up_to_date
- if not MacOS::CLT.installed? then <<-EOS.undent
- No developer tools installed
- You should install the Command Line Tools:
- https://developer.apple.com/downloads/
+ if not MacOS::CLT.installed?
+ message = <<-EOS.undent
+ No developer tools installed.
+ You should install the Command Line Tools.
EOS
- elsif MacOS::CLT.outdated? then <<-EOS.undent
- A newer Command Line Tools release is available
- You should install the latest version from:
- https://developer.apple.com/downloads
+ if MacOS.version >= :mavericks
+ message += <<-EOS.undent
+ Run `xcode-select --install` to install them.
+ EOS
+ else
+ message += <<-EOS.undent
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
+ or it can be installed via Xcode's preferences.
+ EOS
+ end
+ message
+ elsif MacOS::CLT.outdated?
+ message = <<-EOS.undent
+ A newer Command Line Tools release is available
EOS
+ if MacOS.version >= :mavericks
+ message += <<-EOS.undent
+ Update them from Software Update in the App Store.
+ EOS
+ else
+ message += <<-EOS.undent
+ The standalone package can be obtained from
+ https://developer.apple.com/downloads/,
+ or it can be installed via Xcode's preferences.
+ EOS
+ end
end
end