blob: 70607662ffc26eabed0c2b673762efae0b83714c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env perl
# deltree: recursively removes file and directory,
# trying to handle permissions and other complications.
use strict;
use warnings FATAL => 'all';
use File::Path qw/rmtree/;
my $exit_status = 0;
local $SIG{__WARN__} = sub { warn "@_"; $exit_status = 1; };
foreach my $path (@ARGV) {
local $@ = undef;
rmtree ($path);
}
exit $exit_status;
# vim: ft=perl ts=4 sw=4 et
|