47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/vos/helpers/ubuntu.rb', line 47
def rsync_to entry
raise "invalid argument!" unless entry.is_a? Entry
raise "#{path} must be a Dir" unless dir?
raise "#{entry.path} can't be a File!" if entry.file?
if local? and !entry.local?
Box.local.bash("rsync -e 'ssh' -al --delete --stats --progress #{path}/ root@#{entry.driver.host}:#{entry.path}")
elsif entry.local? and !local?
Box.local.bash("rsync -e 'ssh' -al --delete --stats --progress root@#{driver.host}:#{path}/ #{entry.path}")
else
raise "invalid usage!"
end
end
|