diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-08-17 23:17:25 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-08-17 23:17:36 -0400 |
commit | d74651a9c0102cc55a6b495eb4e2f12d3fca7795 (patch) | |
tree | ae0eb434c0127e84655422f053a47bba1e4b5876 /lib | |
parent | html document structure, div markers, watch (diff) |
rsync, replace --delete-after with --delete
apparently not all versions of rsync accept more specific option
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 15 |
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}" |