aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/sysenv.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index 5a59ebf8..127e4181 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -774,7 +774,7 @@ module SiSU_Env
#? system("scp -Cr #{@input} #{@output}") \
#: (puts "\tWARN: #{program} not found" )
end
- def rsync(action='',chdir='.')
+ def rsync(action='',chdir=nil)
program='rsync'
if program_found?(program)
vb=if @cmd =~/q/; 'q'
@@ -783,11 +783,17 @@ module SiSU_Env
end
msg=''
msg=" && echo 'OK: #{@input} -> #{@output}'" unless @cmd =~/q/
- puts "rsync -az#{vb} #{action} #{@input} #{@output}" if @cmd =~/[vVM]/
+ puts "rsync -az#{vb} #{action} #{@input} #{@output}" if @cmd =~/[vVM]/
+ dir_change,dir_return='',''
+ if chdir \
+ && chdir != Dir.pwd
+ dir_change="cd #{chdir}"
+ dir_return='cd -'
+ end
system("
- cd #{chdir}
+ #{dir_change}
rsync -az#{vb} #{action} #{@input} #{@output} #{msg}
- cd -
+ #{dir_return}
")
else puts "\tWARN: #{program} not found"
end
@@ -3818,7 +3824,7 @@ WOK
"#{output_path.base.url}/po4a/#{@md.fnb}/pot"
end
def rcp
- p "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
+ #p "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
end
self
end