line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
########################################### |
2
|
|
|
|
|
|
|
package GitMeta::SshDir; |
3
|
|
|
|
|
|
|
########################################### |
4
|
|
|
|
|
|
|
# 2010, Mike Schilli |
5
|
|
|
|
|
|
|
########################################### |
6
|
1
|
|
|
1
|
|
638
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
7
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
8
|
1
|
|
|
1
|
|
5
|
use base qw(GitMeta); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
99
|
|
9
|
1
|
|
|
1
|
|
5
|
use Sysadm::Install qw(:all); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
11
|
|
10
|
1
|
|
|
1
|
|
316
|
use Log::Log4perl qw(:easy); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
########################################### |
13
|
|
|
|
|
|
|
sub expand { |
14
|
|
|
|
|
|
|
########################################### |
15
|
0
|
|
|
0
|
0
|
|
my($self) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $ssh = "ssh"; |
18
|
0
|
0
|
|
|
|
|
$ssh = $ENV{GIT_SSH} if defined $ENV{GIT_SSH}; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$self->param_check("host", "dir"); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
INFO "Retrieving repos ", |
23
|
|
|
|
|
|
|
"from $self->{host}"; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my($stdout) = tap $ssh, $self->{host}, |
26
|
|
|
|
|
|
|
"ls", $self->{dir}; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my @repos = (); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
while( $stdout =~ /(.*)\n/g ) { |
31
|
0
|
|
|
|
|
|
push @repos, |
32
|
|
|
|
|
|
|
"$self->{host}:$self->{dir}/$1"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return @repos; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |