aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/sisu/v0/sysenv.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index a259d991..ed0012e2 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -712,6 +712,7 @@ module SiSU_Env
end
def scp
program='scp'
+ puts "scp -Cr #@input #@output" if @cmd =~/[vVM]/
if program_found?(program); system("scp -Cr #@input #@output")
else puts "\tWARN: #{program} not found"
end
@@ -725,6 +726,7 @@ module SiSU_Env
end
msg=''
msg=" && echo 'OK: #@input -> #@output'" unless @cmd =~/q/
+ puts "rsync -az#{vb} #{action} #@input #@output" if @cmd =~/[vVM]/
system("rsync -az#{vb} #{action} #@input #@output #{msg}")
else puts "\tWARN: #{program} not found"
end
@@ -2469,7 +2471,8 @@ WOK
and remote_gen !~/\/\//) \
and @@flag_remote==true \
and @opt.cmd !~/U/
- System_call.new(local_gen,remote_gen,@opt.cmd).rsync('--delete-after')
+ delete_extra_files='--delete' # '--delete-after'
+ System_call.new(local_gen,remote_gen,@opt.cmd).rsync(delete_extra_files)
if FileTest.file?("#{local_src}/#{src_txt}")
System_call.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
if defined? @md.ec[:image] and not @md.ec[:image].empty?
@@ -2569,10 +2572,11 @@ WOK
and @rc['permission_set']['remote_base_site'] \
and @@flag_remote==true \
and @opt.cmd !~/U/
+ delete_extra_files='--delete' # '--delete-after'
puts "begin rsync_base_sync: #{local} -> #{remote}"
- System_call.new("#{local}/_sisu/image_sys/",remote).rsync('--delete-after')
- System_call.new("#{local}/_sisu/image/",remote).rsync('--delete-after')
- System_call.new("#{local}/#{@env.path.style}/",remote).rsync('--delete-after')
+ System_call.new("#{local}/_sisu/image_sys/",remote).rsync(delete_extra_files)
+ System_call.new("#{local}/_sisu/image/",remote).rsync(delete_extra_files)
+ System_call.new("#{local}/#{@env.path.style}/",remote).rsync(delete_extra_files)
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_base_sync: #{local} -> #{remote}"
@@ -2589,7 +2593,8 @@ WOK
remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
if @@flag_remote
#if defined? @rc['permission_set']['remote_base_site'] and @rc['permission_set']['remote_base_site'] #and @@flag_remote==true and @opt.cmd !~/U/
- System_call.new(local,remote).rsync('--delete-after')
+ delete_extra_files='--delete' # '--delete-after'
+ System_call.new(local,remote).rsync(delete_extra_files)
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_sitemaps: #{local} -> #{remote}"