Class AutomateIt::PackageManager::APT
In: lib/automateit/package_manager/apt.rb
Parent: AutomateIt::PackageManager::DPKG

PackageManager::APT

The APT driver for the PackageManager provides a way to manage software packages on Debian-style systems using apt-get and dpkg.

Methods

install  

Public Instance methods

See AutomateIt::PackageManager#install

[Source]

# File lib/automateit/package_manager/apt.rb, line 13
  def install(*packages)
    return _install_helper(*packages) do |list, opts|
      # apt-get options:
      # -y : yes to all queries
      # -q : no interactive progress bars
      cmd = "export DEBIAN_FRONTEND=noninteractive; apt-get install -y -q "+list.join(" ")+" < /dev/null"
      cmd << " > /dev/null" if opts[:quiet]
      cmd << " 2>&1"

      interpreter.sh(cmd)
    end
  end

[Validate]