Line | |
---|
1 | @perl -w -Sx %0 %*
|
---|
2 | @goto end_of_perl
|
---|
3 | #!perl -w
|
---|
4 | BEGIN { push(@INC,'lib') }
|
---|
5 | use strict;
|
---|
6 | use File::Find;
|
---|
7 | use ExtUtils::Manifest qw(maniread);
|
---|
8 | my $files = maniread();
|
---|
9 | my %files;
|
---|
10 | foreach (keys %$files)
|
---|
11 | {
|
---|
12 | $files{lc($_)} = $files->{$_};
|
---|
13 | }
|
---|
14 |
|
---|
15 | my @dead;
|
---|
16 | find(sub {
|
---|
17 | return if -d $_;
|
---|
18 | my $name = $File::Find::name;
|
---|
19 | $name =~ s#^\./##;
|
---|
20 | unless (exists $files{lc($name)})
|
---|
21 | {
|
---|
22 | # print "new $name\n";
|
---|
23 | push(@dead,$name);
|
---|
24 | }
|
---|
25 | },'.');
|
---|
26 |
|
---|
27 | foreach my $file (@dead)
|
---|
28 | {
|
---|
29 | chmod(0666,$file) unless -w $file;
|
---|
30 | unlink($file) || warn "Cannot delete $file:$!";
|
---|
31 | }
|
---|
32 |
|
---|
33 | __END__
|
---|
34 | :end_of_perl
|
---|
35 | del perl.exe
|
---|
36 | del perl*.dll
|
---|
Note:
See
TracBrowser
for help on using the repository browser.