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|-l|-h]
26 -x show only the extra files
27 -m show only the missing files
28 -l show the files one per line instead of one line
29 -h show only this help
33 use vars qw($x $m $l $h);
37 open(MANIFEST, "MANIFEST") or die "MANIFEST: $!";
41 use File::Basename qw(dirname);
44 if (/^(\S+)\t+(.+)$/) {
52 warn "MANIFEST:$.:$_";
61 my $n = $File::Find::name;
69 for (sort keys %find) {
70 push @xtra, $_ unless $mani{$_} || $mand{$_};
73 for (sort keys %mani) {
74 push @miss, $_ unless $find{$_};
79 unshift @xtra, "extra:" if @xtra;
80 unshift @miss, "missing:" if @miss;
82 print "@xtra\n", if @xtra && !$m;
83 print "@miss\n" if @miss && !$x;