require "shellwords" require "tagen/core/kernel/shell" module Saber module Task # send files to seedbox. class Send < Base desc "send1", "send" # @overload send(*files, dest) def send1(*args) if args.length == 1 then Saber.ui.error! "At least one src for send -- src: nil, dest: #{args[1].inspect}." end *files, dest = args system "rsync -ahP #{files.shelljoin} #{Rc.server.user}@#{Rc.server.host}:#{dest}", show_cmd: "$" end end end end