aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-07-16 21:01:34 +0100
committerMike McQuaid2016-07-27 15:05:42 -0600
commit0e25fc01430ae10cc5638d9b0ae9c1784821d2c0 (patch)
tree05896a0da63b5f4db19b9067cd58f4fcff3e34ec /Library
parent012fc4709ab2e0189a39a41a5c47e832e037bfb1 (diff)
downloadbrew-0e25fc01430ae10cc5638d9b0ae9c1784821d2c0.tar.bz2
xcode: add update instruction helpers.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 093680698..65ba50e9e 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -72,6 +72,19 @@ module OS
!prefix.nil?
end
+ def update_instructions
+ if MacOS.version >= "10.9" && !OS::Mac.prerelease?
+ <<-EOS.undent
+ Xcode can be updated from the App Store.
+ EOS
+ else
+ <<-EOS.undent
+ Xcode can be updated from
+ https://developer.apple.com/xcode/downloads/
+ EOS
+ end
+ end
+
def version
# may return a version string
# that is guessed based on the compiler, so do not
@@ -166,6 +179,20 @@ module OS
!!detect_version
end
+ def update_instructions
+ if MacOS.version >= "10.9"
+ <<-EOS.undent
+ Update them from Software Update in the App Store.
+ EOS
+ elsif MacOS.version == "10.8" || MacOS.version == "10.7"
+ <<-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
+
def latest_version
case MacOS.version
when "10.12" then "800.0.33.1"