1 #!/usr/bin/perl -- -*- mode: cperl -*-
5 rrr-dirtyupdate - add a file with an old timestamp to the dataset
9 rrr-dirtyupdate [options] file epoch
17 my @opt = <<'=back' =~ /B<--(\S+)>/g;
21 (TBD) Do not really run the command, ...
25 Prints a brief message and exists.
35 When you later discover missing files...
39 This is slow: it calls aggregate twice with force which took 2 x 10-15 seconds on PAUSE.
47 use File
::Find
qw(find);
48 use File
::Rsync
::Mirror
::Recent
;
50 use Pod
::Usage
qw(pod2usage);
65 # my($file,$epoch) = @ARGV; # XXX
67 if ($Opt{'dry-run'}) {
68 die "FIXME: not yet implemented";
71 my $rf = File
::Rsync
::Mirror
::Recentfile
->new_from_file
73 "/home/ftp/pub/PAUSE/authors/RECENT-1h.yaml",
76 die "ALERT: Could not create an rf: $@";
79 warn "prove of concept for one file only. Last chance to hit ^C now to interrupt. sleeping $sleep";
81 my $recent = File
::Rsync
::Mirror
::Recent
->new
83 local => "/home/ftp/pub/PAUSE/authors/RECENT-1h.yaml",
85 my $recentev = $recent->news();
86 for my $re (@
$recentev) {
87 my $recfile = "/home/ftp/pub/PAUSE/authors/".$re->{path
};
89 print "Not found: $recfile\n";
98 # cperl-indent-level: 4