| 1 | package Zed::Plugin::Exe::Put; | ||
| 2 | |||
| 3 | use Zed::Plugin; | ||
| 4 | use Zed::Output; | ||
| 5 | use Zed::Config::Env; | ||
| 6 | use Zed::Config::Space; | ||
| 7 | use strict; | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | put localfile remotefile | ||
| 12 | ex: | ||
| 13 | put /tmp/foo /tmp/bar | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | our %OPT = ( glob => 1, recursive => 1, quiet => 0 ); | ||
| 18 | |||
| 19 | invoke "put" => sub { | ||
| 20 | |||
| 21 | my ( @files, @host) = @_; | ||
| 22 | |||
| 23 | return unless @host = targets(); | ||
| 24 | |||
| 25 | Zed::SSHPool::run(\@host => 'put', { %OPT }, @files); | ||
| 26 | }; | ||
| 27 | 1; |