/[CCFs]/bin/deleteccf
ViewVC logotype

Contents of /bin/deleteccf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Thu Feb 14 14:26:44 2013 UTC (11 years, 9 months ago) by ccflib
Branch: MAIN
Changes since 1.3: +7 -1 lines
updated

1 #! /usr/local/bin/perl -w
2 #
3 # Giuseppe Vacanti (cosine science & computing bv)
4 #
5 # $Id: deleteccf,v 1.3 2003/10/31 15:52:32 ccflib Exp $
6 #
7 # This script simply deletes all CCFs put in the subdir ccfdev/deleted, and it is intended to be run by
8 # a crontab, either on xmm or in xvsas05.
9
10 require 5;
11 use strict;
12 use vars '%ENV';
13 use lib "$ENV{'HOME'}/cgi";
14 $ENV{'PATH'} .= "$ENV{'HOME'}/bin:";
15 use Ccflib;
16
17 #chdir $Ccflib::develrm or die("Cannot access $Ccflib::develrm\n");
18 # Ccflib.pm is located in $HOME/cgi and provides definitions of dircetories for ccflib
19 #
20 # Of course this is possible only on the host that knows where is /home/ccflib, not xvsoc01.
21 chdir "/home/ccflib/ftp-area/private/ccfdevel/deleted/" or die("Cannot access /home/ccflib/ftp-area/private/ccfdevel/deleted/\n");
22
23 my $deletes;
24 foreach my $ccf (glob("*.CCF")){
25 qx/rm -f $ccf/;
26 if(! $? >> 8){
27 warn("Deletion of $ccf failed\n");
28 } else {
29 $deletes .= "$ccf ";
30 }
31 }
32 if($deletes){
33 print "The following constituents were found in the removed subdirectory:\n";
34 print "$deletes\n";
35 print "Now they have been definetely erased.\n";
36 }
37
38 ##my $x = qx/ccfnotify -t development -d $deletes/;
39 ##
40 ##if(! $? >> 8){
41 ## warn("Notification failed\n");
42 ##}
43
44
45
46
47
48

  ViewVC Help
Powered by ViewVC 1.1.27