From 268ba1f5835fdefc6b0db7e0c11084c0d321fe00 Mon Sep 17 00:00:00 2001 From: jkh Date: Wed, 28 Sep 1994 12:25:28 +0000 Subject: Add mkavail script to make a mailing list file out of the avail file automagically each and any time it's changed. Change log_accum.pl to send to the new cvs-committers mailing list that uses this file. This should cut down on the size of our monster cvs mail headers considerably! :-) Many thanks to Gary Clark II for these changes. Submitted by: gclarkii --- CVSROOT/log_accum.pl | 8 +++++--- CVSROOT/mkavail | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100755 CVSROOT/mkavail (limited to 'CVSROOT') diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index 1ad3aa808b39..1e5dcc2547ef 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -252,10 +252,12 @@ sub do_avail_file { sub mail_notification { local(@text) = @_; local($names); - + local($mailing_lists); + $commiters = "CVS-commiters"; print "Mailing commit message...\n"; dbmopen(MAILFILE, "$MAIL_FILE.$id", 0666); - $names = join(" ", keys %MAILFILE) . " $mlist"; + $mailing_lists = join(' ', $mlist, $commiters); + $names = join(" ", keys %MAILFILE) . " $mailing_lists"; $names =~ s,\n,,; dbmclose(MAILFILE); @@ -308,7 +310,7 @@ if ($ARGV[0] =~ /New directory/) { exit 0; } -&do_avail_file($dir); +#&do_avail_file($dir); # # Iterate over the body of the message collecting information. diff --git a/CVSROOT/mkavail b/CVSROOT/mkavail new file mode 100755 index 000000000000..740ada6d3d5a --- /dev/null +++ b/CVSROOT/mkavail @@ -0,0 +1,22 @@ +#!/usr/bin/perl +# +# Perl module to convert a CVS avail file into a majordomo alias file. +# + +$MAILING_LIST = '/home/mail/cvs-commiters'; +$AVAIL_FILE = '/home/ncvs/CVSROOT/avail'; + +open (MAIL, ">$MAILING_LIST"); +open (AVAIL, "<$AVAIL_FILE"); + + while () { + if (/^avail\|(.*)/) { + $master = $1; + foreach $who (split(/,/, $master)) { + print (MAIL "$who\n"); + } + } + } + +close MAIL; +close AVAIL; -- cgit