#!/usr/bin/perl
my
@opt
=
<<'=back' =~ /B<--(\S+)>/g;
=item B<--dry-run!>
(TBD) Do not really run the command, ...
=item B<--help|h>
Prints a brief message and exits.
=item B<--locktimeout=s>
Sets the locktimeout. See L<File::Rsync::Mirror::Recentfile>.
=item B<--verbose|v+>
More feedback.
=back
=head1 DESCRIPTION
rersyncrecent is a project to get speedy rsync operation on large
trees over multiple hosts. It maintains a collection of files
with
metadata (so called recentfiles) that represent adjacent or
overlapping timespans of file change events.
rrr-aggregate merges the recentfiles that describe a tree. The file
argument is the path to the principal (the shortest) in a collection
of recentfiles.
=cut
our
%Opt
;
GetOptions(\
%Opt
,
@opt
,
) or pod2usage(2);
if
(
$Opt
{help}) {
pod2usage(0);
}
if
(!
@ARGV
) {
pod2usage(2);
}
if
(
$Opt
{
'dry-run'
}) {
die
"FIXME: not yet implemented"
;
}
my
$rf
= File::Rsync::Mirror::Recentfile->new_from_file(
$ARGV
[0]);
if
(
my
$tout
=
$Opt
{locktimeout}) {
$rf
->locktimeout(
$tout
);
}
$rf
->aggregate();