Class: Frank::Publish::ShellSCP
- Inherits:
-
Object
- Object
- Frank::Publish::ShellSCP
- Defined in:
- lib/frank/publish/shell_scp.rb
Overview
TODO
Class Method Summary collapse
Class Method Details
.shell_copy(local_dir, remote_dir, options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/frank/publish/shell_scp.rb', line 9 def self.shell_copy(local_dir, remote_dir, ) host = [] command = ["scp "] command << "-P #{[:port]} " if [:port] command << "-r #{local_dir}/* " host << "#{[:username]}" if [:username] host << ":#{[:password]}" if [:password] host << "@#{[:host]}:#{remote_dir}" shell_command = "#{command.join('')}#{host.join('')}" system(shell_command) end |