From ce19fa222361839d2c04986f81ae66c8a8748a61 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 14 Dec 2013 09:35:58 -0600 Subject: Unify install name parsing --- Library/Homebrew/cmd/bottle.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 935ca149e..1e5ec4ba3 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -72,14 +72,13 @@ module Homebrew extend self keg_ref_files.each do |file| puts "#{Tty.red}#{file}#{Tty.reset}" - linked_libraries = [] - # Check dynamic library linkage. Importantly, do not run otool on static # libraries, which will falsely report "linkage" to themselves. if file.mach_o_executable? or file.dylib? or file.mach_o_bundle? - linked_libraries.concat `otool -L "#{file}"`.split("\n").drop(1) - linked_libraries.map! { |lib| lib[Keg::OTOOL_RX, 1] } + linked_libraries = file.dynamically_linked_libraries linked_libraries = linked_libraries.select { |lib| lib.include? string } + else + linked_libraries = [] end linked_libraries.each do |lib| -- cgit v1.2.3