aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-07-21 16:41:50 -0500
committerJack Nagel2013-07-21 16:41:50 -0500
commitaa2554640d4dadba095bcadc635375451de55060 (patch)
tree946e529f9b2675268eba48eec768c9f58d5acf40
parent13df53166a24366206d6599efb964b92fcac24b4 (diff)
downloadbrew-aa2554640d4dadba095bcadc635375451de55060.tar.bz2
Split up unreadable conditional
-rw-r--r--Library/Homebrew/os/mac/xcode.rb13
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?