Sha256: 775eb72efb590de9790b7bd734d7c122feec2e02889b5c2e38d55e84ed2adf09

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

module Divvy
  module Plugins
    module Apt
      def apt(*packages)
        packages.flatten!
        
        options = { :dependencies_only => false }
        options.update(packages.pop) if packages.last.is_a?(Hash)
        
        command = [ "DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive" ]
        command << 'apt-get -qyu'
        command << (options[:dependencies_only] ? 'build-dep' : 'install')
        command << packages
        
        run(command.join(' '))
      end      
    end
  end
end

Divvy.register_plugin(Divvy::Plugins::Apt)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
michaeldwan-divvy-0.1.2 lib/divvy/plugins/apt.rb
michaeldwan-divvy-0.1.5 lib/divvy/plugins/apt.rb