aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
authorWilliam Woodruff2015-06-13 20:32:04 -0400
committerMisty De Meo2015-08-21 10:58:13 -0700
commit85187bf6d3779692c77b5ef8a256f16b3048294a (patch)
tree004ba5d7a8096238d829068550901b5de933e0c8 /Library/Homebrew/os
parent8aad5230630c04c231c2d90406780deeb7a65109 (diff)
downloadbrew-85187bf6d3779692c77b5ef8a256f16b3048294a.tar.bz2
MacOS: update locate_cctool
This becomes MacOS.{install_name_tool,otool}, only do check_xcode if xcode is installed, otherwise emit a warning
Diffstat (limited to 'Library/Homebrew/os')
-rw-r--r--Library/Homebrew/os/mac.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index ffab00b00..185126548 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -36,6 +36,22 @@ module OS
end
end
+ def install_name_tool
+ if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/install_name_tool")
+ Pathname.new(path)
+ else
+ locate("install_name_tool")
+ end
+ end
+
+ def otool
+ if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/otool")
+ Pathname.new(path)
+ else
+ locate("otool")
+ end
+ end
+
def active_developer_dir
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
end