diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-11-25 22:26:15 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-11-25 22:26:15 +0000 |
commit | 2b75b5315e452e01803d9ac719d6f52dcc204ad5 (patch) | |
tree | 4d6e61baf98de9f62146fbf74fef689ba64621e7 | |
parent | 0282114cf208a3705ff47ced4744c62bb452aacb (diff) | |
download | mga-youri-submit-2b75b5315e452e01803d9ac719d6f52dcc204ad5.tar mga-youri-submit-2b75b5315e452e01803d9ac719d6f52dcc204ad5.tar.gz mga-youri-submit-2b75b5315e452e01803d9ac719d6f52dcc204ad5.tar.bz2 mga-youri-submit-2b75b5315e452e01803d9ac719d6f52dcc204ad5.tar.xz mga-youri-submit-2b75b5315e452e01803d9ac719d6f52dcc204ad5.zip |
Allow setting ulri log file
-rw-r--r-- | lib/Youri/Submit/Action/Ulri.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Youri/Submit/Action/Ulri.pm b/lib/Youri/Submit/Action/Ulri.pm index 221676a..ea4de23 100644 --- a/lib/Youri/Submit/Action/Ulri.pm +++ b/lib/Youri/Submit/Action/Ulri.pm @@ -22,13 +22,14 @@ sub _init { uphost => '', user => '', ssh_key => '', + logfile => '', verbose => '', @_ ); croak "undefined upload host" unless $options{uphost}; croak "undefined ssh key" unless $options{ssh_key}; - foreach my $var ('user', 'uphost', 'ssh_key', 'verbose') { + foreach my $var ('user', 'uphost', 'ssh_key', 'logfile', 'verbose') { $self->{"_$var"} = $options{$var}; } @@ -39,7 +40,11 @@ sub run { my ($self, $package, $repository, $target, $define) = @_; croak "Not a class method" unless ref $self; - my $cmd = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} ulri"; + my $remotecmd = "ulri"; + if ($self->{_logfile}) { + $remotecmd = "ULRI_LOG_FILE=$self->{_logfile} " . $remotecmd; + } + my $cmd = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} $remotecmd"; print "Submit::Action::Ulri: doing $cmd\n" if $self->{_verbose}; } =head1 COPYRIGHT AND LICENSE |