Sha256: bc045bec28ddcf7d5cda1f6e7dfaa697b3a2a72bc669e8bbb131f606f06aa074

Contents?: true

Size: 1.16 KB

Versions: 36

Compression:

Stored size: 1.16 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  namespace :aptitude do
    desc "Updates all installed packages on aptitude package system"
    task :updates do
      sudo "apt-get -qy update"
      utilities.apt_upgrade
      sudo "apt-get -qy autoremove"
    end

    desc "Installs a specified aptitude package"
    task :install do
      deb_pkg_name = utilities.ask "Enter name of the package(s) you wish to install:"
      raise "Please specify deb_pkg_name" if deb_pkg_name == ''
      logger.info "Updating packages..."
      sudo "aptitude update"
      logger.info "Installing #{deb_pkg_name}..."
      utilities.apt_install deb_pkg_name
    end

    desc "Removes a specified aptitude package"
    task :remove do
      deb_pkg_name = utilities.ask "Enter name of the package(s) you wish to remove:"
      raise "Please specify deb_pkg_name" if deb_pkg_name == ''
      logger.info "Updating packages..."
      sudo "aptitude update"
      logger.info "Removing #{deb_pkg_name}..."
      utilities.sudo_with_input "apt-get remove --purge #{deb_pkg_name}", /^Do you want to continue\?/
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
crazycode-cap-recipes-0.4.0 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.39.3 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.39.2 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.39.1 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.39 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.38 lib/cap_recipes/tasks/aptitude/manage.rb
crazycode-cap-recipes-0.3.37 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.36 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.35 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.34 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.33 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.32 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.30 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.29 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.28 lib/cap_recipes/tasks/aptitude/manage.rb
cap-recipes-0.3.27 lib/cap_recipes/tasks/aptitude/manage.rb