/[CCFs]/bin/deleteccf
ViewVC logotype

Annotation of /bin/deleteccf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations)
Sat Jul 4 11:59:30 2020 UTC (4 years, 4 months ago) by ccflib
Branch: MAIN
Changes since 1.6: +2 -12 lines
Now only runs on sasbld01n. xvsoc01 is defintiely gone.

1 ccflib 1.6 #! /xdata/ccflib/perl5/perlbrew/perls/perl-5.18.4/bin/perl -w
2 ccflib 1.1 #
3 ccflib 1.7 # $Id: deleteccf,v 1.6 2018/01/15 10:02:11 ccflib Exp $
4 ccflib 1.1 #
5 ccflib 1.5 # This script simply deletes all CCFs put in the subdir ccfdev/deleted.
6 ccflib 1.4
7 ccflib 1.1 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
13 ccflib 1.5
14 ccflib 1.6 my $host=qx/\/bin\/hostname | cut -d. -f1/ ;
15 ccflib 1.5 my $homedir="/home/ccflib" ;
16     chomp($host);
17    
18     chdir "$homedir/ftp-area/private/ccfdevel/deleted/" ;
19 ccflib 1.1
20     my $deletes;
21     foreach my $ccf (glob("*.CCF")){
22 ccflib 1.7 qx/rm -f $ccf/ if ($ccf);
23 ccflib 1.1 if(! $? >> 8){
24     warn("Deletion of $ccf failed\n");
25     } else {
26     $deletes .= "$ccf ";
27     }
28     }
29 ccflib 1.3 if($deletes){
30     print "The following constituents were found in the removed subdirectory:\n";
31     print "$deletes\n";
32     print "Now they have been definetely erased.\n";
33     }
34    
35     ##my $x = qx/ccfnotify -t development -d $deletes/;
36     ##
37     ##if(! $? >> 8){
38     ## warn("Notification failed\n");
39     ##}

  ViewVC Help
Powered by ViewVC 1.1.27