initial checkin
[rersyncrecent.git] / bin / rrr-overview
blobcd901a526bab988028c2001904733e11ee64d6db
1 #!/usr/bin/perl
3 =head1 NAME
5 rrr-overview - summarize the dataset
7 =head1 SYNOPSIS
9 rrr-overview [options] principal_recentfile
11 =head1 OPTIONS
13 =over 8
15 =cut
17 my $optpod = <<'=back';
19 =item B<--help|h>
21 Prints a brief message and exists.
23 =item B<--verbose|v+>
25 More feedback.
27 =back
29 =head1 DESCRIPTION
31 rersyncrecent is a project to get speedy rsync operation on large
32 trees over multiple hosts. It maintains a collection of files with
33 metadata (so called recentfiles) that represent adjacent or
34 overlapping timespans of file change events.
36 rrr-overview summarizes the contents of the recentfiles.
38 =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 my @opt = $optpod =~ /B<--(\S+)>/g;
50 GetOptions(\%Opt,
51 @opt,
52 ) or pod2usage(2);
54 if ($Opt{help}) {
55 pod2usage(0);
58 if (@ARGV > 1) {
59 pod2usage(2);
60 } elsif (0 == @ARGV and -f "RECENT.recent") {
61 @ARGV = "RECENT.recent";
62 } elsif (1 == @ARGV) {
63 } else {
64 pod2usage(2);
67 my $rf = File::Rsync::Mirror::Recent->new
69 local => $ARGV[0],
71 my @args;
72 if ($Opt{verbose}) {
73 push @args, "verbose", $Opt{verbose};
75 print $rf->overview(@args);
77 __END__
80 # Local Variables:
81 # mode: cperl
82 # coding: utf-8
83 # cperl-indent-level: 4
84 # End: