archs_for_command now follows symlinks.
Tell file(1) to follow symlinks using the -L option. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
bc82bfc6d5
commit
07ce6d6e16
@ -177,7 +177,7 @@ def archs_for_command cmd
|
|||||||
cmd = `/usr/bin/which #{cmd}` unless Pathname.new(cmd).absolute?
|
cmd = `/usr/bin/which #{cmd}` unless Pathname.new(cmd).absolute?
|
||||||
cmd.gsub! ' ', '\\ ' # Escape spaces in the filename.
|
cmd.gsub! ' ', '\\ ' # Escape spaces in the filename.
|
||||||
|
|
||||||
archs = IO.popen("/usr/bin/file #{cmd}").readlines.inject([]) do |archs, line|
|
archs = IO.popen("/usr/bin/file -L #{cmd}").readlines.inject([]) do |archs, line|
|
||||||
case line
|
case line
|
||||||
when /Mach-O (executable|dynamically linked shared library) ppc/
|
when /Mach-O (executable|dynamically linked shared library) ppc/
|
||||||
archs << :ppc7400
|
archs << :ppc7400
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user