aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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