class Cfgd::Adapter::PACMAN

Pkgmanager class for archlinux

Constants

PACMAN_ARGS
PACMAN_BIN
PACMAN_INFO_ARGS
PACMAN_INSTALL_ARGS
PACMAN_REMOVE_ARGS
PACMAN_UPDATE_ARGS
PACMAN_UPGRADE_ARGS
SHELL_ENV

Public Class Methods

install_single(name) click to toggle source
# File lib/adapter/pkgmanager/pacman.rb, line 23
def self.install_single(name)
  cmd = "#{SHELL_ENV} #{PACMAN_BIN} #{PACMAN_INSTALL_ARGS} #{PACMAN_ARGS} #{name}"
  _stdout, _stderr, status = Open3.capture3(cmd)
  status.exitstatus.shellexit
end
installed?(name) click to toggle source
# File lib/adapter/pkgmanager/pacman.rb, line 29
def self.installed?(name)
  cmd = "#{SHELL_ENV} #{PACMAN_BIN} #{PACMAN_INFO_ARGS} #{PACMAN_ARGS} #{name}"
  _stdout, _stderr, status = Open3.capture3(cmd)
  status.exitstatus.shellexit
end
remove_single(name) click to toggle source
# File lib/adapter/pkgmanager/pacman.rb, line 35
def self.remove_single(name)
  cmd = "#{SHELL_ENV} #{PACMAN_BIN} #{PACMAN_REMOVE_ARGS} #{PACMAN_ARGS} #{name}"
  _stdout, _stderr, status = Open3.capture3(cmd)
  status.exitstatus.shellexit
end
supports_os?(os) click to toggle source
# File lib/adapter/pkgmanager/pacman.rb, line 11
def self.supports_os?(os)
  true if os.eql? 'archlinux'
end