This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Faster feature checks
[perl5.git] / Porting / manicheck
CommitLineData
4d1e77f9 1#!/usr/bin/perl
93209f39 2
a7d002a1
DM
3# output a list of:
4# a) files listed in MANIFEST which don't exist
5# b) files which exist but which aren't in MANIFEST
6
93209f39 7use strict;
4d1e77f9 8use warnings;
93209f39 9use File::Find;
93209f39 10
1ae6ead9 11open my $fh, '<', 'MANIFEST' or die "Can't read MANIFEST: $!\n";
4d1e77f9
RGS
12my @files = map { (split)[0] } <$fh>;
13close $fh;
14for (@files) {
15 print "$_ from MANIFEST doesn't exist\n" if ! -f;
93209f39 16}
4d1e77f9
RGS
17my %files = map { $_ => 1 } @files;
18find {
19 wanted => sub {
20 my $x = $File::Find::name; $x =~ s/^..//;
21 return if -d;
3618011f 22 return if $_ eq '.gitignore';
d42c7c41
GK
23 return if $_ eq '.gitattributes';
24 return if $_ eq '.git_patch';
3618011f 25 return if $x =~ /^\.git\b/;
79ff1055 26 return if $x =~ m{^\.github/};
f13b7ac8 27 print "$x\t\tnot in MANIFEST\n" if !$files{$x};
4d1e77f9
RGS
28 },
29}, ".";
93209f39 30