diff options
| author | Jack Nagel | 2013-07-21 16:41:50 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-07-21 16:41:50 -0500 |
| commit | 42df11d962e150ac5c52c8f7e8a5caa9a0e73696 (patch) | |
| tree | 896147bb18fa2237c241533bd0f369d2e63dc63b /Library | |
| parent | f0fcdb991f9568f125ac219d5cd527222733c3b2 (diff) | |
| download | homebrew-42df11d962e150ac5c52c8f7e8a5caa9a0e73696.tar.bz2 | |
Split up unreadable conditional
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 334f08f70..da419aa3d 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -161,9 +161,16 @@ module MacOS::CLT extend self # For Xcode < 4.3, this is the standard location. Otherwise, it means that the user has # installed the "Command Line Tools" package. def installed? - (MacOS.dev_tools_path == Pathname.new("#{MacOS::CLT::STANDALONE_PKG_PATH}/usr/bin") \ - and File.directory? "#{MacOS::CLT::STANDALONE_PKG_PATH}/usr/include") or - (MacOS.dev_tools_path == Pathname.new("/usr/bin") and File.directory? "/usr/include") + mavericks_dev_tools? || usr_dev_tools? + end + + def mavericks_dev_tools? + MacOS.dev_tools_path == Pathname("#{STANDALONE_PKG_PATH}/usr/bin") && + File.directory?("#{STANDALONE_PKG_PATH}/usr/include") + end + + def usr_dev_tools? + MacOS.dev_tools_path == Pathname("/usr/bin") && File.directory?("/usr/include") end def latest_version? |
