This commit is contained in:
Artur Gurgul 2025-08-06 07:17:19 +02:00
parent 0c98334d1c
commit e515e5a76c
4 changed files with 29 additions and 4 deletions

View file

@ -1,8 +1,15 @@
require 'open3'
module DebianSystem
def os_name
"Debian Linux"
end
def cpus
stdout, stderr, status = Open3.capture3("nproc")
stdout.strip.to_i
end
def install(packages)
missing_packages = packages.reject { |pkg| package_installed?(pkg) }

View file

@ -1,8 +1,15 @@
require 'open3'
module MacOSSystem
def os_name
"macOS"
end
def cpus
stdout, stderr, status = Open3.capture3("sysctl -n hw.ncpu")
stdout.strip.to_i
end
def install(packages)
missing_packages = packages.reject { |pkg| package_installed?(pkg) }