new perls v5.39.10
[andk-cpan-tools.git] / bin / testing-rmirror-pause-k81.pl
blob1490adda76c91183c60a7407ee1108266704b7c5
1 #!/usr/local/perl-5.10-uld/bin/perl
3 $ENV{USER}="andk"; # fill in your name
4 $ENV{RSYNC_PASSWORD} = shift or die; # fill in your passwd
6 use File::Rsync::Mirror::Recent;
7 my @rrr = map {
8 File::Rsync::Mirror::Recent->new
10 ignore_link_stat_errors => 1,
11 localroot => "/home/ftp/pub/PAUSE/$_",
12 remote => "pause.perl.org::PAUSE/$_/RECENT.recent",
13 max_files_per_connection => 200,
14 rsync_options =>
16 port => 8732, # only for PAUSE
17 compress => 1,
18 links => 1,
19 times => 1,
20 timeout => 600,
21 checksum => 0,
23 ttl => 10,
24 verbose => 1,
25 # verboselog => "/var/log/rmirror-pause.log",
26 runstatusfile => "/var/log/rmirror-status-$_.state",
27 )} "authors", "modules";
28 die "directory $_ doesn't exist, giving up" for grep { ! -d $_->localroot } @rrr;
29 while (){
30 my $ttgo = time + 20;
31 for my $rrr (@rrr){
32 $rrr->rmirror ( "skip-deletes" => 1 );
34 my $sleep = $ttgo - time;
35 if ($sleep >= 1) {
36 # print STDERR "sleeping $sleep ... ";
37 sleep $sleep;