make make_patchnum.sh (more) portable
[p5sagit/p5-mst-13.2.git] / Porting / manicheck
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use File::Find;
6
7 open my $fh, 'MANIFEST' or die "Can't read MANIFEST: $!\n";
8 my @files = map { (split)[0] } <$fh>;
9 close $fh;
10 for (@files) {
11     print "$_ from MANIFEST doesn't exist\n" if ! -f;
12 }
13 my %files = map { $_ => 1 } @files;
14 find {
15     wanted => sub {
16         my $x = $File::Find::name; $x =~ s/^..//;
17         return if -d;
18         return if $_ eq '.gitignore';
19         return if $x =~ /^\.git\b/;
20         print "$File::Find::name not in MANIFEST\n" if !$files{$x};
21     },
22 }, ".";
23