1 |
ccflib |
1.1 |
#! /usr/local/bin/perl -w |
2 |
|
|
# |
3 |
|
|
# Giuseppe Vacanti (cosine science & computing bv) |
4 |
|
|
# |
5 |
ccflib |
1.3 |
# $Id: deleteccf,v 1.2 2002/03/19 15:05:09 ccflib Exp $ |
6 |
ccflib |
1.1 |
# |
7 |
|
|
require 5; |
8 |
|
|
use strict; |
9 |
ccflib |
1.3 |
use vars '%ENV'; |
10 |
|
|
use lib "$ENV{'HOME'}/cgi"; |
11 |
|
|
$ENV{'PATH'} .= "$ENV{'HOME'}/bin:"; |
12 |
ccflib |
1.1 |
use Ccflib; |
13 |
|
|
|
14 |
ccflib |
1.3 |
#chdir $Ccflib::develrm or die("Cannot access $Ccflib::develrm\n"); |
15 |
|
|
chdir "/home/ccflib/ftp-area/private/ccfdevel/deleted/" or die("Cannot access /home/ccflib/ftp-area/private/ccfdevel/deleted/\n"); |
16 |
ccflib |
1.1 |
|
17 |
|
|
my $deletes; |
18 |
|
|
foreach my $ccf (glob("*.CCF")){ |
19 |
|
|
qx/rm -f $ccf/; |
20 |
|
|
if(! $? >> 8){ |
21 |
|
|
warn("Deletion of $ccf failed\n"); |
22 |
|
|
} else { |
23 |
|
|
$deletes .= "$ccf "; |
24 |
|
|
} |
25 |
|
|
} |
26 |
ccflib |
1.3 |
if($deletes){ |
27 |
|
|
print "The following constituents were found in the removed subdirectory:\n"; |
28 |
|
|
print "$deletes\n"; |
29 |
|
|
print "Now they have been definetely erased.\n"; |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
##my $x = qx/ccfnotify -t development -d $deletes/; |
33 |
|
|
## |
34 |
|
|
##if(! $? >> 8){ |
35 |
|
|
## warn("Notification failed\n"); |
36 |
|
|
##} |
37 |
|
|
|
38 |
|
|
|
39 |
ccflib |
1.1 |
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|