diff options
| author | William Woodruff | 2015-06-13 20:32:04 -0400 |
|---|---|---|
| committer | Misty De Meo | 2015-08-21 10:58:13 -0700 |
| commit | 85187bf6d3779692c77b5ef8a256f16b3048294a (patch) | |
| tree | 004ba5d7a8096238d829068550901b5de933e0c8 /Library/Homebrew/os | |
| parent | 8aad5230630c04c231c2d90406780deeb7a65109 (diff) | |
| download | brew-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.rb | 16 |
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 |
