Sha256: 48450007a25ca9b3dd0272738e92f68d89a3b2e103e4609a8dde8199523dc5e6

Contents?: true

Size: 524 Bytes

Versions: 5

Compression:

Stored size: 524 Bytes

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
saber-1.2.4 lib/saber/task/send.rb
saber-1.2.3 lib/saber/task/send.rb
saber-1.2.2 lib/saber/task/send.rb
saber-1.2.1 lib/saber/task/send.rb
saber-1.2.0 lib/saber/task/send.rb