/[CCFs]/bin/deleteccf
ViewVC logotype

Diff of /bin/deleteccf

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

revision 1.4 by ccflib, Thu Feb 14 14:26:44 2013 UTC revision 1.5 by ccflib, Tue Dec 2 14:06:51 2014 UTC
# Line 1  Line 1 
1  #! /usr/local/bin/perl -w  #! /usr/local/bin/perl -w
2  #  #
3  # Giuseppe Vacanti (cosine science & computing bv)  # $Id: deleteccf,v 1.4 2013/02/14 14:26:44 ccflib Exp $
4  #  #
5  # $Id: deleteccf,v 1.3 2003/10/31 15:52:32 ccflib Exp $  # This script simply deletes all CCFs put in the subdir ccfdev/deleted.
6  #  # It is intended to be run by a crontab, either on xvsoc01 or in sasbld01
 # This script simply deletes all CCFs put in the subdir ccfdev/deleted, and it is intended to be run by  
 # a crontab, either on xmm or in xvsas05.  
7    
8  require 5;  require 5;
9  use strict;  use strict;
10  use vars '%ENV';  use vars '%ENV';
11  use lib "$ENV{'HOME'}/cgi";  use lib "$ENV{'HOME'}/cgi";
12  $ENV{'PATH'} .= "$ENV{'HOME'}/bin:";  $ENV{'PATH'} .= "$ENV{'HOME'}/bin:";
 use Ccflib;  
13    
14  #chdir $Ccflib::develrm or die("Cannot access $Ccflib::develrm\n");  # Can not use Ccflib.pm located in $HOME/cgi because it has definitions for directories only on xvsoc01.
15  # Ccflib.pm is located in $HOME/cgi and provides definitions of dircetories for ccflib  # use Ccflib;
16  #  
17  # Of course this is possible only on the host that knows where is /home/ccflib, not xvsoc01.  my $host=qx/hostname | cut -d. -f1/ ;
18  chdir "/home/ccflib/ftp-area/private/ccfdevel/deleted/" or die("Cannot access /home/ccflib/ftp-area/private/ccfdevel/deleted/\n");  my $homedir="/home/ccflib" ;
19    chomp($host);
20    $homedir="/data/xmm/ccflib" if  ( $host eq "xvsoc01" ) ;
21    
22    chdir "$homedir/ftp-area/private/ccfdevel/deleted/" ;
23    
24  my $deletes;  my $deletes;
25  foreach my $ccf (glob("*.CCF")){  foreach my $ccf (glob("*.CCF")){

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

  ViewVC Help
Powered by ViewVC 1.1.27