5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/capistrano/unison.rb', line 5
def self.load_into(configuration)
configuration.load do
namespace :unison do
task :default do
set :repository, "."
set :deploy_via, :unison
set :scm, :none
after 'moonshine:configure', 'unison:default'
end
task :setup do
sudo "apt-get update"
sudo "apt-get install -y unison"
copy end
task :copy do
find_servers.each do |server|
system "unison -auto -batch -contactquietly . ssh://#{server}/#{shared_path}/unison-copy"
end
end
end
end
end
|