[cage] Remove duplicate lines in MANIFEST.generated
[parrot.git] / tools / dev / manicheck.pl
blobb333ef7d967efa088f45ea6831f86e472a4a1fec
1 #! perl
2 ################################################################################
3 # Copyright (C) 2001-2005, Parrot Foundation.
4 # $Id$
5 ################################################################################
7 =head1 NAME
9 tools/dev/manicheck.pl - Check the MANIFEST file
11 =head1 SYNOPSIS
13 % perl tools/dev/manicheck.pl
15 =head1 DESCRIPTION
17 Check the contents of the F<MANIFEST> file against the files present in
18 this directory tree, accounting for .svn dirs. Prints out the
19 number of I<missing>, I<expected> and I<extra> files, and
20 then any extra files are listed.
22 Files that match the patterns in MANIFEST.SKIP are not reported as extra
23 files.
25 =cut
27 ################################################################################
29 use strict;
30 use warnings;
31 use FindBin;
32 use lib "$FindBin::Bin/../../lib";
34 use ExtUtils::Manifest;
36 $ExtUtils::Manifest::Quiet = 1;
37 my $manifest = ExtUtils::Manifest::maniread();
38 my $file_list = ExtUtils::Manifest::manifind();
39 my @missing = ExtUtils::Manifest::manicheck();
40 my @extra = ExtUtils::Manifest::filecheck();
42 # my @ignored = ExtUtils::Manifest::skipcheck();
44 # strip '~' backup files from the extra list
45 @extra = grep !m/~$/, @extra;
47 printf "Found %d distinct files among MANIFEST and directory contents.\n\n",
48 scalar( keys %{$file_list} );
50 printf " %5d missing\n", scalar @missing;
51 printf " %5d extra\n", scalar @extra;
53 if (@missing) {
54 print "\n";
55 print "Missing files:\n";
56 foreach (@missing) {
57 print " $_\n";
61 if (@extra) {
62 print "\n";
63 print "Extra files:\n";
64 foreach (@extra) {
65 print " $_\n";
69 exit scalar(@missing) or scalar(@extra) ? 1 : 0;
71 # Local Variables:
72 # mode: cperl
73 # cperl-indent-level: 4
74 # fill-column: 100
75 # End:
76 # vim: expandtab shiftwidth=4: