diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-21 22:11:50 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-21 22:11:50 +0000 |
commit | 41510af71ad35c1639c7891738bee9ab5c19275f (patch) | |
tree | ac46c58cca39f02e11ee92c2d2dbf27fd30cdf0d /win32/distclean.bat | |
parent | 79086a00fceeae7aba98dc19e4dcdc07692dddbf (diff) | |
download | perl-41510af71ad35c1639c7891738bee9ab5c19275f.tar.gz |
Handy script for when one forgets to "dmake clean"
p4raw-id: //depot/perlio@8226
Diffstat (limited to 'win32/distclean.bat')
-rwxr-xr-x | win32/distclean.bat | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/win32/distclean.bat b/win32/distclean.bat new file mode 100755 index 0000000000..e202eab5d9 --- /dev/null +++ b/win32/distclean.bat @@ -0,0 +1,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
\ No newline at end of file |