1 |
#! /usr/local/bin/perl -w |
#! /usr/local/bin/perl -w |
2 |
# |
# |
3 |
# Giuseppe Vacanti (cosine science & computing) |
# Giuseppe Vacanti (cosine science & computing) |
4 |
# $Date: 2002/02/18 20:23:57 $ |
# Eduardo Ojero Pascual (serco) |
5 |
# |
# |
6 |
# It receives the mirror log for the current package on stdin. |
# After several changes in mail gtwy at ESAC, the different mail addresses |
7 |
|
# have been changed |
8 |
|
# |
9 |
|
# Mailman mail distribution lists have to be of the form: list@xmm.esac.esa.int |
10 |
|
# |
11 |
|
# $replyto for xmm-it, sas-devel should now go to : eduardo.ojero@esa.it |
12 |
|
# |
13 |
|
# $Id: ccfnotify,v 1.6 2010/02/15 13:49:16 ccflib Exp $ |
14 |
# |
# |
15 |
require 5; |
require 5; |
16 |
use FileHandle; |
use FileHandle; |
18 |
use strict; |
use strict; |
19 |
|
|
20 |
my %opts; |
my %opts; |
21 |
getopts('t:', \%opts); # -t development|release|public |
getopts('t:d', \%opts); # -t development|release|public |
22 |
|
# -d => @names (see next line) were deleted |
23 |
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 |
24 |
# CCF constituents |
# CCF constituents |
25 |
|
|
29 |
my @to; |
my @to; |
30 |
my $replyto; |
my $replyto; |
31 |
my $subject; |
my $subject; |
32 |
|
my $delete = $opts{'d'}; |
33 |
|
|
34 |
foreach($update){ |
foreach($update){ |
35 |
|
|
36 |
/^development$/ && do { |
/^development$/ && do { |
37 |
@to = qw/xmm-it sas-devel/; |
@to = qw/xmm-it sas-devel/; |
38 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
39 |
$replyto = 'xmm-it@xmm.vilspa.esa.es'; |
$replyto = 'eduardo.ojero@esa.int'; |
40 |
next; |
next; |
41 |
}; |
}; |
42 |
|
|
43 |
/^release$/ && do { |
/^release$/ && do { |
44 |
@to = qw/xmm-it sas-devel/; |
@to = qw/xmm-it sas-devel/; |
45 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
46 |
$replyto = 'xmm-it@xmm.vilspa.esa.es'; |
$replyto = 'eduardo.ojero@esa.int'; |
47 |
next; |
next; |
48 |
}; |
}; |
49 |
|
|
50 |
/^public$/ && do { |
/^public$/ && do { |
51 |
@to = qw/ccf xmm-it sas-devel/; |
@to = qw/ccf xmm-it sas-devel/; |
52 |
$subject = "XMM-Newton calibration update"; |
$subject = "XMM-Newton calibration update"; |
53 |
$replyto = 'xmmhelp@xmm.vilspa.esa.es'; |
$replyto = 'xmmhelp@sciops.esa.int'; |
54 |
next; |
next; |
55 |
}; |
}; |
56 |
|
|
59 |
|
|
60 |
exit(0) if(not @names); |
exit(0) if(not @names); |
61 |
|
|
62 |
|
# |
63 |
|
# notice that sendmail is in /usr/lib not in /usr/bin or /usr/sbin |
64 |
|
|
65 |
foreach(@to){ |
foreach(@to){ |
66 |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
67 |
|
|
68 |
$fh->print("From: ccflib\@xmm.vilspa.esa.es |
$fh->print("From: ccflib\@xmm.esac.esa.int |
69 |
Reply-To: $replyto |
Reply-To: $replyto |
70 |
To: $_\@xmm.vilspa.esa.es |
To: $_\@xmm.esac.esa.int |
71 |
Subject: $subject |
Subject: $subject |
72 |
"); |
"); |
73 |
|
|
74 |
|
if($delete){ |
75 |
|
$fh->print("\nThe following calibration constituents were deleted or moved to another directory:\n\n"); |
76 |
|
} else { |
77 |
|
$fh->print("\nThe following new calibration constituents are available:\n\n"); |
78 |
|
} |
79 |
|
|
|
$fh->print("\nThe following new calibration constituents are available:\n\n"); |
|
|
|
|
80 |
foreach(@names){ |
foreach(@names){ |
81 |
$fh->print("$_\n"); |
$fh->print("$_\n"); |
82 |
} |
} |
85 |
$fh->print(' |
$fh->print(' |
86 |
For details and download instructions please refer to: |
For details and download instructions please refer to: |
87 |
|
|
88 |
http://xmm.vilspa.esa.es/calibration/ |
http://xmm2.esac.esa.int/external/xmm_sw_cal/calib/ |
89 |
http://xmm.vilspa.esa.es/ccf/releasenotes/ |
http://xmm2.esac.esa.int/external/xmm_sw_cal/calib/rel_notes |
90 |
|
|
91 |
Best regards, |
Best regards, |
92 |
|
|
93 |
The XMM-Newton Calibration Librarian |
The XMM-Newton Calibration Librarian |
94 |
xmmhelp@xmm.vilspa.esa.es |
|
95 |
|
xmmhelp@sciops.esa.int |
96 |
|
|
97 |
'); |
'); |
98 |
|
|
101 |
} |
} |
102 |
|
|
103 |
} |
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|