Class: Saber::Task::Send

Inherits:
Base
  • Object
show all
Defined in:
lib/saber/task/send.rb

Overview

send files to seedbox.

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, invoke

Constructor Details

This class inherits a constructor from Saber::Task::Base

Instance Method Details

#send(*files, dest) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/saber/task/send.rb', line 11

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