aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-11-25 22:26:15 +0000
committerPascal Terjan <pterjan@mageia.org>2012-11-25 22:26:15 +0000
commit2b75b5315e452e01803d9ac719d6f52dcc204ad5 (patch)
tree4d6e61baf98de9f62146fbf74fef689ba64621e7
parent0282114cf208a3705ff47ced4744c62bb452aacb (diff)
downloadmga-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.pm9
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