Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/win32/distclean.bat

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


@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 %files;
foreach (keys %$files)
 {
  $files{lc($_)} = $files->{$_};
 } 

my @dead;
find(sub { 
 return if -d $_;
 my $name = $File::Find::name;
 $name =~ s#^\./##;
 unless (exists $files{lc($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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].