11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/capistrano/ext/capstrap/apt.rb', line 11
def self.load_into(configuration)
configuration.load do
def self.task_name(pkg)
pkg.gsub(/-/, "_").to_sym
end
namespace :apt do
desc "Resynchronizes the package index files."
task :update do
unless @updated
apt_update
@updated = true
end
end
namespace :install do
desc "Installs packages for running RVM"
task :rvm_depends do
apt_install APT_RVM_PKGS.join(" ")
end
desc "Installs packages for running MRI/REE."
task :mri_depends do
apt_install APT_MRI_AND_REE_PKGS.join(" ")
end
desc "Installs all packages via apt-get."
task :default do
rvm_depends
mri_depends
end
end
end
before "apt:install:rvm_depends", "apt:update"
before "apt:install:mri_depends", "apt:update"
end
end
|