From 8dca762f8789cd97306640265892ed88e44af313 Mon Sep 17 00:00:00 2001 From: Flavio Poletti Date: Fri, 8 Aug 2008 19:47:35 +0200 Subject: [PATCH] Added ghost option for compression, currently not working. Perltidy. --- deploy | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/deploy b/deploy index ae711e2..3c46558 100755 --- a/deploy +++ b/deploy @@ -23,15 +23,16 @@ my %config = ( GetOptions( \%config, qw( - usage! help! man! version! - - debug|D! - dir|directory|d=s - password|pass|p:s - prompt|P! - script|s=s - username|user|u=s - ) + usage! help! man! version! + + compress|c! + debug|D! + dir|directory|d=s + password|pass|p:s + prompt|P! + script|s=s + username|user|u=s + ) ); pod2usage(message => "$0 $VERSION", -verbose => 99, -sections => ' ') if $config{version}; @@ -109,7 +110,7 @@ sub get_ssh { my $ssh = Net::SSH::Perl->new( $hostname, protocol => 2, - debug => $config{debug} + debug => $config{debug}, ); $ssh->login($config{username}, $config{password}, 'suppress_shell'); @@ -120,12 +121,13 @@ sub get_sftp { my ($hostname) = @_; return Net::SFTP->new( $hostname, - warn => sub { }, - user => $config{username}, + warn => sub { }, + user => $config{username}, password => $config{password}, ssh_args => { - protocol => 2, - debug => $config{debug}, + protocol => 2, + debug => $config{debug}, + compression => $config{compress}, } ); } ## end sub get_sftp -- 2.11.4.GIT