class Cfgd::Adapter::PKG
Pkgmanager
class for freebsd
Constants
- PKG_ARGS
- PKG_BIN
- PKG_INFO_ARGS
- PKG_INSTALL_ARGS
- PKG_REMOVE_ARGS
- PKG_UPDATE_ARGS
- PKG_UPGRADE_ARGS
- SHELL_ENV
Public Class Methods
install_single(name)
click to toggle source
# File lib/adapter/pkgmanager/pkg.rb, line 23 def self.install_single(name) cmd = "#{SHELL_ENV} #{PKG_BIN} #{PKG_INSTALL_ARGS} #{PKG_ARGS} #{name}" _stdout, _stderr, status = Open3.capture3(cmd) status.exitstatus.shellexit end
installed?(name)
click to toggle source
# File lib/adapter/pkgmanager/pkg.rb, line 29 def self.installed?(name) cmd = "#{SHELL_ENV} #{PKG_BIN} #{PKG_INFO_ARGS} #{name}" _stdout, _stderr, status = Open3.capture3(cmd) status.exitstatus.shellexit end
remove_single(name)
click to toggle source
# File lib/adapter/pkgmanager/pkg.rb, line 35 def self.remove_single(name) cmd = "#{SHELL_ENV} #{PKG_BIN} #{PKG_REMOVE_ARGS} #{PKG_ARGS} #{name}" _stdout, _stderr, status = Open3.capture3(cmd) status.exitstatus.shellexit end
supports_os?(os)
click to toggle source
# File lib/adapter/pkgmanager/pkg.rb, line 11 def self.supports_os?(os) true if os.eql? 'freebsd' end