aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-17 11:56:32 -0700
committerAdam Vandenberg2012-03-17 11:56:32 -0700
commit1cdd35b7e81e8bee41f6bf55d3ca228aa11659a1 (patch)
tree09b2cf950feb56bf66b8968a7bf7a1828c757279 /Library/Homebrew
parent672128c908b9899a312227d1e6763977dfb907a8 (diff)
downloadbrew-1cdd35b7e81e8bee41f6bf55d3ca228aa11659a1.tar.bz2
doctor: check OS version
We warn if you are not running the latest Leopard or Snow Leopard. (We do not currently check Lion or Mountain Lion versions.)
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/doctor.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 9d4d0abe1..9b9b15256 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -861,6 +861,26 @@ def check_for_unlinked_but_not_keg_only
end
end
+def check_os_version
+ if MACOS_FULL_VERSION =~ /^10\.6(\.|$)/
+ unless (MACOS_FULL_VERSION == "10.6.8")
+ return <<-EOS.undent
+ Please update Snow Leopard.
+ 10.6.8 is the supported version of Snow Leopard.
+ You are still running #{MACOS_FULL_VERSION}.
+ EOS
+ end
+ elsif MACOS_FULL_VERSION =~ /^10\.5(\.|$)/
+ unless (MACOS_FULL_VERSION == "10.5.8")
+ return <<-EOS.undent
+ Please update Leopard.
+ 10.5.8 is the supported version of Leopard.
+ You are still running #{MACOS_FULL_VERSION}.
+ EOS
+ end
+ end
+end
+
end # end class Checks
module Homebrew extend self