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,16 +154,10 @@ class Keg
def mach_o_files def mach_o_files
mach_o_files = [] mach_o_files = []
dirs = %w{bin sbin lib Frameworks} path.find do |pn|
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? next if pn.symlink? or pn.directory?
mach_o_files << pn if pn.dylib? or pn.mach_o_bundle? or pn.mach_o_executable? mach_o_files << pn if pn.dylib? or pn.mach_o_bundle? or pn.mach_o_executable?
end end
end
mach_o_files mach_o_files
end end