ports cleaning script

Ion-Mihai Tetcu itetcu at people.tecnik93.com
Sun Jan 22 16:15:54 PST 2006


On Sun, 22 Jan 2006 15:52:34 -0800
randall ehren <randall at ucsb.edu> wrote:

> hi -
>   a few years ago i wrote a small perl script to cleanup all ports
> that had a 'work' directory, aka a 'make clean'. it's quite simple,
> but i haven't found anything that does a similar thing.
> 
> cleanup_port_ports.pl:
> #!/usr/bin/perl
> 
> ####
> ###
> ## clean out the ports tree (remove all the 'work' directories)
> # randall s. ehren 20001011
> 
> @works = `/usr/bin/find /usr/ports/ -name work`;
> foreach $directory (@works) {
>   print "removing $directory";
>   `/bin/rm -r $directory`;
> }

''make clean'' does more that removing work directory for some ports (that
generate config files -- like Makefile.inc, postfix ports used to do
this).

simpler would be to used -exec option of find or xargs, or porsclean -C.


-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #416:
We're out of slots on the server




More information about the freebsd-ports mailing list