brew/Library/Homebrew/os/linux/hardware.rb
Shaun Jackman 258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00

26 lines
404 B
Ruby

module LinuxHardware
def cpu_type
@@cpu_type ||= case `uname -m`
when /x86_64/
:intel
when /i386/
:intel
else
:dunno
end
end
def intel_family
:dunno
end
def processor_count
`grep -c ^processor /proc/cpuinfo`.to_i
end
def is_64_bit?
return @@is_64_bit if defined? @@is_64_bit
@@is_64_bit = /64/ === `uname -m`
end
end