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