4 # manicheck - check files against the MANIFEST
6 # Without options prints out (possibly) two lines:
11 # With option -x prints out only the missing files (and without the "extra: ")
12 # With option -m prints out only the extra files (and without the "missing: ")
16 $SIG{__WARN__} = sub {
17 help() if $_[0] =~ /"main::\w" used only once: possible typo at /;
25 $0: Usage: $0 [-x|-m|-h]
26 -x show only the extra files
27 -m show only the missing files
28 -h show only this help
32 use vars qw($x $m $h);
36 open(MANIFEST, "MANIFEST") or die "MANIFEST: $!";
41 if (/^(\S+)\t+(.+)$/) {
44 warn "MANIFEST:$.:$_";
54 my $f = $File::Find::name;
63 for (sort keys %find) {
64 push @xtra, $_ unless $mani{$_};
67 for (sort keys %mani) {
68 push @miss, $_ unless $find{$_};
71 printf("%s@xtra\n", $x || $m ? "" : "extra: ") if @xtra && !$m;
72 printf("%s@miss\n", $x || $m ? "" : "missing: ") if @miss && !$x;