1#!/usr/bin/perl 2 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 7use strict; 8use warnings; 9use File::Find; 10 11open my $fh, '<', 'MANIFEST' or die "Can't read MANIFEST: $!\n"; 12my @files = map { (split)[0] } <$fh>; 13close $fh; 14for (@files) { 15 print "$_ from MANIFEST doesn't exist\n" if ! -f; 16} 17my %files = map { $_ => 1 } @files; 18find { 19 wanted => sub { 20 my $x = $File::Find::name; $x =~ s/^..//; 21 return if -d; 22 return if $_ eq '.mailmap'; 23 return if $_ eq '.gitignore'; 24 return if $_ eq '.gitattributes'; 25 return if $_ eq '.git_patch'; 26 return if $x =~ /^\.git\b/; 27 return if $x =~ m{^\.github/}; 28 print "$x\t\tnot in MANIFEST\n" if !$files{$x}; 29 }, 30}, "."; 31 32