diff options
Diffstat (limited to 'Library/Homebrew/hardware.rb')
| -rw-r--r-- | Library/Homebrew/hardware.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index fe07aee9d..997598def 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -80,6 +80,18 @@ module Hardware def feature?(name) features.include?(name) end + + def can_run?(arch) + if is_32_bit? + arch_32_bit == arch + elsif intel? + [:i386, :x86_64].include? arch + elsif ppc? + [:ppc, :ppc64].include? arch + else + false + end + end end end |
