diff options
| author | Adam Vandenberg | 2010-03-31 15:06:46 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-04-06 08:22:28 -0700 |
| commit | ff28073ee3cb09c495751b8389aeafb7059c44e4 (patch) | |
| tree | c80a70d8f93632f6908f502e23b74fb8f9380ff7 /Library | |
| parent | d6a4a20a216978c3a5e5d0c8c27b114d68fcd7db (diff) | |
| download | homebrew-ff28073ee3cb09c495751b8389aeafb7059c44e4.tar.bz2 | |
Move gcc version check.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew_doctor.rb | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 4109804b5..5da494945 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -27,6 +27,23 @@ def check_for_other_package_managers end end +def check_gcc_versions + gcc_42 = gcc_42_build + gcc_40 = gcc_40_build + + if gcc_42 < RECOMMENDED_GCC_42 + puts "Your gcc 4.2.x version is older than the recommended version. It may be advisable" + puts "to upgrade to the latest release of Xcode." + puts + end + + if gcc_40 < RECOMMENDED_GCC_40 + puts "Your gcc 4.0.x version is older than the recommended version. It may be advisable" + puts "to upgrade to the latest release of Xcode." + puts + end +end + def brew_doctor read, write = IO.pipe @@ -35,22 +52,7 @@ def brew_doctor $stdout.reopen write check_for_stray_dylibs - - gcc_42 = gcc_42_build - gcc_40 = gcc_40_build - - if gcc_42 < RECOMMENDED_GCC_42 - puts "Your gcc 4.2.x version is older than the recommended version. It may be advisable" - puts "to upgrade to the latest release of Xcode." - puts - end - - if gcc_40 < RECOMMENDED_GCC_40 - puts "Your gcc 4.0.x version is older than the recommended version. It may be advisable" - puts "to upgrade to the latest release of Xcode." - puts - end - + check_gcc_versions check_for_other_package_managers check_for_x11 |
