Sha256: 69de97ee33476a6823d013b4bf13f49f0959bd0fa53851a8c2b65741ff6fa4df

Contents?: true

Size: 658 Bytes

Versions: 3

Compression:

Stored size: 658 Bytes

Contents

module Sprinkle
  module Installers
    class Apt < Installer
      attr_accessor :packages

      def initialize(parent, *packages, &block)
        super parent, &block
        packages.flatten!
        
        options = { :dependencies_only => false }
        options.update(packages.pop) if packages.last.is_a?(Hash)
        
        @command = options[:dependencies_only] ? 'build-dep' : 'install'
        @packages = packages
      end

      protected

        def install_commands
          "DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get -qyu #{@command} #{@packages.join(' ')}"
        end

    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
auser-sprinkle-0.1.5 lib/sprinkle/installers/apt.rb
crafterm-sprinkle-0.1.5 lib/sprinkle/installers/apt.rb
sprinkle-0.1.5 lib/sprinkle/installers/apt.rb