/[CCFs]/bin/deleteccf
ViewVC logotype

Diff of /bin/deleteccf

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ccflib, Mon Mar 18 18:28:57 2002 UTC revision 1.4 by ccflib, Thu Feb 14 14:26:44 2013 UTC
# Line 2  Line 2 
2  #  #
3  # Giuseppe Vacanti (cosine science & computing bv)  # Giuseppe Vacanti (cosine science & computing bv)
4  #  #
5  # $Id$  # $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;  require 5;
11  use strict;  use strict;
12  use lib "/data/xmm/ccflib/cgi";  use vars '%ENV';
13  $Env{'PATH'} .= "/data/xmm/ccflib/bin:";  use lib "$ENV{'HOME'}/cgi";
14    $ENV{'PATH'} .= "$ENV{'HOME'}/bin:";
15  use Ccflib;  use Ccflib;
16    
17  chdir $Ccflib::develrm or die("Cannot access $Ccflib::develrm\n");  #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;  my $deletes;
24  foreach my $ccf (glob("*.CCF")){  foreach my $ccf (glob("*.CCF")){
# Line 21  foreach my $ccf (glob("*.CCF")){ Line 29  foreach my $ccf (glob("*.CCF")){
29      $deletes .= "$ccf ";      $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    
 my $x = qx/ccfnotify -t development -d $deletes/;  
46    
 if(! $? >> 8){  
   warn("Notification failed\n");  
 }  
47    
48    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.27