summaryrefslogtreecommitdiff
path: root/win32/distclean.bat
blob: e202eab5d9821dad9232a7b5ee61f88704058be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@perl -w -Sx %0 %*
@goto end_of_perl
#!perl -w
BEGIN { push(@INC,'lib') }
use strict;
use File::Find;
use ExtUtils::Manifest qw(maniread);
my $files = maniread();
my @dead;
find(sub { 
return if -d $_;
my $name = $File::Find::name;
$name =~ s#^\./##;
 unless (exists $files->{$name})
  {
   print "new $name\n";
   push(@dead,$name);
  } 
},'.');

foreach my $file (@dead)
 {
  chmod(0666,$file) unless -w $file;
  unlink($file) || warn "Cannot delete $file:$!";
 }

__END__
:end_of_perl
del perl.exe
del perl*.dll