aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/mach.rb
diff options
context:
space:
mode:
authorJack Nagel2012-06-16 11:35:02 -0500
committerJack Nagel2012-06-16 11:43:43 -0500
commit898c93aa4eec4cab8ce73c865ceccb05535bb18e (patch)
tree78024aa6e11c7f7161a27d6a6aa3c6aa636f6c5d /Library/Homebrew/mach.rb
parent1354366f4ed21ed714fffbd641a813587b4b4805 (diff)
downloadhomebrew-898c93aa4eec4cab8ce73c865ceccb05535bb18e.tar.bz2
Teach Mach-O machinery about bundles
c.f. #12810. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/mach.rb')
-rw-r--r--Library/Homebrew/mach.rb5
1 files changed, 5 insertions, 0 deletions
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