/[CCFs]/bin/ccfnotify
ViewVC logotype

Diff of /bin/ccfnotify

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

revision 1.2 by ccflib, Mon Mar 18 18:28:57 2002 UTC revision 1.4 by ccflib, Wed Nov 26 13:57:42 2003 UTC
# Line 1  Line 1 
1  #! /usr/local/bin/perl -w  #! /usr/local/bin/perl -w
2  #  #
3  # Giuseppe Vacanti (cosine science & computing)  # Giuseppe Vacanti (cosine science & computing)
 # $Date: 2002/03/18 17:19:22 $  
4  #  #
5  # It receives the mirror log for the current package on stdin.  # $Id$
6  #  #
7  require 5;  require 5;
8  use FileHandle;  use FileHandle;
# Line 12  use strict; Line 11  use strict;
11    
12  my %opts;  my %opts;
13  getopts('t:d', \%opts); # -t development|release|public  getopts('t:d', \%opts); # -t development|release|public
14                          # -d => @names (below) were deleted                          # -d => @names (see next line) were deleted
15  my @names = @ARGV; # the rest of the command line contains the names of the  my @names = @ARGV; # the rest of the command line contains the names of the
16                     # CCF constituents                     # CCF constituents
17    
# Line 22  my $update = $opts{'t'}; Line 21  my $update = $opts{'t'};
21  my @to;  my @to;
22  my $replyto;  my $replyto;
23  my $subject;  my $subject;
24  my $delete;  my $delete = $opts{'d'};
25    
26  foreach($update){  foreach($update){
27        
28    /^development$/ && do {    /^development$/ && do {
29      @to = qw/xmm-it sas-devel/;      @to = qw/xmm-it sas-devel/;
30      $subject = "Update of the $update CCF area";      $subject = "Update of the $update CCF area";
31      $replyto = 'xmm-it@xmm.vilspa.esa.es';      $replyto = 'xmm-it@xmm.vilspa.esa.es';
     $delete = $opts{'d'};  
32      next;      next;
33    };    };
34        
# Line 52  foreach($update){ Line 51  foreach($update){
51    
52  exit(0) if(not @names);  exit(0) if(not @names);
53        
54    # test
55    #######@to = qw/gvacanti/;
56    
57  foreach(@to){  foreach(@to){
58    my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n");    my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n");
# Line 63  Subject: $subject Line 64  Subject: $subject
64  ");  ");
65    
66    if($delete){    if($delete){
67      $fh->print("\nThe following calibration constituents were deleted:\n\n");      $fh->print("\nThe following calibration constituents were deleted or moved to another directory:\n\n");
68    } else {    } else {
69      $fh->print("\nThe following new calibration constituents are available:\n\n");      $fh->print("\nThe following new calibration constituents are available:\n\n");
70    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.27