From b6e0dfed2385ee61f6c55907b407cbaefb411ea6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 22 May 2012 23:58:05 -0500 Subject: [PATCH] Recurse into subdirectories when fixing install names --- Library/Homebrew/keg_fix_install_names.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index e0b9259c45..16abf28808 100644 --- a/Library/Homebrew/keg_fix_install_names.rb +++ b/Library/Homebrew/keg_fix_install_names.rb @@ -45,10 +45,14 @@ class Keg end def dylibs + require 'find' + dylibs = [] if (lib = join 'lib').directory? - lib.children.select{ |pn| pn.extname == '.dylib' and not pn.symlink? } - else - [] + lib.find do |pn| + next if pn.symlink? or pn.directory? + dylibs << pn if pn.extname == '.dylib' + end end + dylibs end end