Method: Pkg::Util::Net.rsync_exec
- Defined in:
- lib/packaging/util/net.rb
.rsync_exec(source, opts = {}) ⇒ Object
A generic rsync execution method that wraps rsync_cmd in a call to Pkg::Util::Execution#capture3()
179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/packaging/util/net.rb', line 179 def rsync_exec(source, opts = {}) = { bin: Pkg::Util::Tool.check_tool('rsync'), origin_host: nil, target_path: nil, target_host: nil, extra_flags: nil, dryrun: ENV['DRYRUN'] }.merge(opts.merge(opts.delete_if { |_, value| value.nil? })) stdout, = Pkg::Util::Execution.capture3(rsync_cmd(source, ), true) stdout end |