diff options
author | markm <markm@FreeBSD.org> | 2002-05-16 10:09:28 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-05-16 10:09:28 +0000 |
commit | f56e05005c751822074f0a22aa9a98d2eb189924 (patch) | |
tree | e28fc632241c9d248069d45dd9ab2a41fa64868f /contrib/perl5/eg/van/empty | |
parent | 344ddc14973a1519f100f54051dcb068069fe43c (diff) | |
download | FreeBSD-src-f56e05005c751822074f0a22aa9a98d2eb189924.zip FreeBSD-src-f56e05005c751822074f0a22aa9a98d2eb189924.tar.gz |
Perl is no longer in base. Long live the port!
Diffstat (limited to 'contrib/perl5/eg/van/empty')
-rw-r--r-- | contrib/perl5/eg/van/empty | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/contrib/perl5/eg/van/empty b/contrib/perl5/eg/van/empty deleted file mode 100644 index d699319..0000000 --- a/contrib/perl5/eg/van/empty +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - -# $RCSfile: empty,v $$Revision: 4.1 $$Date: 92/08/07 17:20:50 $ - -# This script empties a trashcan. - -$recursive = shift if $ARGV[0] eq '-r'; - -@ARGV = '.' if $#ARGV < 0; - -chop($pwd = `pwd`); - -dir: foreach $dir (@ARGV) { - unless (chdir $dir) { - print stderr "Can't find directory $dir: $!\n"; - next dir; - } - if ($recursive) { - do cmd('find . -name .deleted -exec /bin/rm -rf {} ;'); - } - else { - if (-d '.deleted') { - do cmd('rm -rf .deleted'); - } - else { - if ($dir eq '.' && $pwd =~ m|/\.deleted$|) { - chdir '..'; - do cmd('rm -rf .deleted'); - } - else { - print stderr "No trashcan found in directory $dir\n"; - } - } - } -} -continue { - chdir $pwd; -} - -# force direct execution with no shell - -sub cmd { - system split(' ',join(' ',@_)); -} - |