source: trunk/essentials/dev-lang/perl/win32/distclean.bat

Last change on this file was 3181, checked in by bird, 18 years ago

perl 5.8.8

File size: 596 bytes
Line 
1@perl -w -Sx %0 %*
2@goto end_of_perl
3#!perl -w
4BEGIN { push(@INC,'lib') }
5use strict;
6use File::Find;
7use ExtUtils::Manifest qw(maniread);
8my $files = maniread();
9my %files;
10foreach (keys %$files)
11 {
12 $files{lc($_)} = $files->{$_};
13 }
14
15my @dead;
16find(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
27foreach 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
35del perl.exe
36del perl*.dll
Note: See TracBrowser for help on using the repository browser.