From 898c93aa4eec4cab8ce73c865ceccb05535bb18e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 16 Jun 2012 11:35:02 -0500 Subject: Teach Mach-O machinery about bundles c.f. #12810. Signed-off-by: Jack Nagel --- Library/Homebrew/mach.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/mach.rb') diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb index ebbc4b57e..7b9d4d345 100644 --- a/Library/Homebrew/mach.rb +++ b/Library/Homebrew/mach.rb @@ -52,6 +52,7 @@ module MachO type = case read(4, offset + 12).unpack("N")[0] when 0x00000002, 0x02000000 then :executable when 0x00000006, 0x06000000 then :dylib + when 0x00000008, 0x08000000 then :bundle else :dunno end @@ -105,4 +106,8 @@ module MachO def mach_o_executable? mach_data.map{ |m| m.fetch :type }.include? :executable end + + def mach_o_bundle? + mach_data.map{ |m| m.fetch :type }.include? :bundle + end end -- cgit v1.2.3