Walk entire keg to find object files to relocate

Closes Homebrew/homebrew#32772.
This commit is contained in:
Tim D. Smith 2014-09-28 15:25:41 -07:00
parent 225bd3bf50
commit 54d0043771

View File

@ -154,15 +154,9 @@ class Keg
def mach_o_files
mach_o_files = []
dirs = %w{bin sbin lib Frameworks}
dirs.map! { |dir| path.join(dir) }
dirs.reject! { |dir| not dir.directory? }
dirs.each do |dir|
dir.find do |pn|
next if pn.symlink? or pn.directory?
mach_o_files << pn if pn.dylib? or pn.mach_o_bundle? or pn.mach_o_executable?
end
path.find do |pn|
next if pn.symlink? or pn.directory?
mach_o_files << pn if pn.dylib? or pn.mach_o_bundle? or pn.mach_o_executable?
end
mach_o_files