This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlsub - indicate version requirement for "delete local"
[perl5.git] / plan9 / uninstall.rc
1 #!/bin/rc
2
3 . buildinfo
4 if (~ $#* 0) platforms = $objtype
5 if not switch($1) {
6         case -a ; platforms = (386 68000 68020 arm arm amd64 mips power power64 sparc sparc64 spim)
7         case * ; echo 'Usage: uninstall.rc [-a]' >[1=2] ; exit
8 }
9 sourceroot=/sys/src/cmd/perl
10 sourcedir=$sourceroot/$p9pvers
11 privroot=/sys/lib/perl
12 privlib=$privroot/$p9pvers
13 sitelib=$privlib/site_perl
14
15 echo Uninstalling perl/$p9pvers
16 cd $sourceroot
17
18 for(i in $platforms){
19     archroot=/$i/lib/perl
20         archlib=$archroot/$p9pvers
21         if (test -d $archlib) rm -r $archlib
22     rm /$i/bin/perl-$p9pvers
23 }
24 if (test -d $privlib) rm -r $privlib
25 if (test -d $sourcedir) rm -r $sourcedir