Module: Computer
- Defined in:
- lib/shell-lite.rb,
lib/shell-lite/shell.rb
Overview
add some system info from/via rbconfig - why? why not?
Defined Under Namespace
Classes: Shell, ShellError
Constant Summary collapse
- OS =
case RbConfig::CONFIG['host_os'].downcase when /linux/ "linux" when /darwin/ "darwin" when /freebsd/ "freebsd" when /netbsd/ "netbsd" when /openbsd/ "openbsd" when /dragonfly/ "dragonflybsd" when /sunos|solaris/ "solaris" when /mingw|mswin/ "windows" else RbConfig::CONFIG['host_os'].downcase end
- CPU =
todo/check: always use downcase - why? why not?
RbConfig::CONFIG['host_cpu']
- ARCH =
case CPU.downcase when /amd64|x86_64|x64/ "x86_64" when /i?86|x86|i86pc/ "i386" when /ppc64|powerpc64/ "powerpc64" when /ppc|powerpc/ "powerpc" when /sparcv9|sparc64/ "sparcv9" when /arm64|aarch64/ # MacOS calls it "arm64", other operating systems "aarch64" "aarch64" when /^arm/ "arm" else RbConfig::CONFIG['host_cpu'] ## todo/check: always use downcase - why? why not? end