try again
[rersyncrecent.git] / bin / rrr-dirtyupdate
blob8d1c30ba2beea3baaeafc9347d3de633ea6dbc3e
1 #!/usr/bin/perl -- -*- mode: cperl -*-
3 =head1 NAME
5 rrr-dirtyupdate - add a file with an old timestamp to the dataset
7 =head1 SYNOPSIS
9 rrr-dirtyupdate [options] file epoch
11 =head1 OPTIONS
13 =over 8
15 =cut
17 my @opt = <<'=back' =~ /B<--(\S+)>/g;
19 =item B<--dry-run!>
21 (TBD) Do not really run the command, ...
23 =item B<--help|h>
25 Prints a brief message and exists.
27 =item B<--verbose|v+>
29 More feedback.
31 =back
33 =head1 DESCRIPTION
35 (TBD)
37 =cut
40 use strict;
41 use warnings;
43 use File::Rsync::Mirror::Recent;
44 use Getopt::Long;
45 use Pod::Usage qw(pod2usage);
47 our %Opt;
48 GetOptions(\%Opt,
49 @opt,
50 ) or pod2usage(1);
52 if ($Opt{help}) {
53 pod2usage(0);
56 unless (@ARGV) {
57 pod2usage(1);
60 # my($file,$epoch) = @ARGV; # XXX
62 if ($Opt{'dry-run'}) {
63 die "FIXME: not yet implemented";
66 my $rf = File::Rsync::Mirror::Recentfile->new_from_file
68 "/home/ftp/pub/PAUSE/authors/RECENT-1h.yaml",
70 unless ($rf) {
71 die "ALERT: Could not create an rf: $@";
73 warn "prove of concept for one file only. Last chance to hit ^C now to interrupt. sleeping 5";
74 sleep 5;
75 $rf->update("/home/ftp/pub/PAUSE/authors/id/S/SA/SAMUELL/Ctype-0.02.readme","new","0.123456789");
76 $rf->aggregate;
77 $rf->aggregate;
79 __END__
82 # Local Variables:
83 # mode: cperl
84 # coding: utf-8
85 # cperl-indent-level: 4
86 # End: