diff options
author | peter <peter@FreeBSD.org> | 1997-06-09 00:46:17 +0800 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-06-09 00:46:17 +0800 |
commit | 70f51d2ef1eda7e11a10c9a48154fd9e8bf0a42d (patch) | |
tree | 44a3a92ac09f45f4acfe85d49f65f0dacbc10908 /CVSROOT | |
parent | f818d990ab5cdd9f4ce58ade568b1dad48c8722a (diff) | |
download | freebsd-ports-gnome-70f51d2ef1eda7e11a10c9a48154fd9e8bf0a42d.tar.gz freebsd-ports-gnome-70f51d2ef1eda7e11a10c9a48154fd9e8bf0a42d.tar.zst freebsd-ports-gnome-70f51d2ef1eda7e11a10c9a48154fd9e8bf0a42d.zip |
Use hostname() to see if we should append @FreeBSD.org to the mail
addresses
Diffstat (limited to 'CVSROOT')
-rwxr-xr-x | CVSROOT/log_accum.pl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index ffb132976fab..bcf6c35c2164 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -1,6 +1,6 @@ #!/usr/local/bin/perl # -# $Id: log_accum.pl,v 1.24 1997/05/17 05:21:44 peter Exp $ +# $Id: log_accum.pl,v 1.25 1997/05/23 04:29:24 peter Exp $ # # Perl filter to handle the log messages from the checkin of files in # a directory. This script will group the lists of files by log @@ -16,7 +16,9 @@ # with parts stolen from Greg Woods <woods@most.wierd.com> version. # -require 5.003; # might work with older perl5 +require 5.003; # might work with older perl5 + +use Sys::Hostname; # get hostname() function ############################################################ # @@ -328,9 +330,16 @@ sub do_changes_file { sub mail_notification { local(@text) = @_; - local($line, $word, $subjlines, $subjwords, @mailaddrs); + local($line, $word, $subjlines, $subjwords, @mailaddrs, $host, $dom); local(%unique); + $host = hostname(); + if ($host =~ /\.freebsd\.org$/i) { + $dom = '@FreeBSD.org'; + } else { + $dom = ''; + } + print "Mailing the commit message...\n"; %unique = (); @@ -343,11 +352,11 @@ sub mail_notification { open(MAIL, "| /usr/sbin/sendmail -odb -oem -t"); } - print(MAIL 'To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org'); + print(MAIL 'To: cvs-committers' . $dom . ", cvs-all" . $dom); foreach $line (@mailaddrs) { next if ($unique{$line}); $unique{$line} = 1; - print(MAIL ", ", $line, '@FreeBSD.org'); + print(MAIL ", " . $line . $dom); } print(MAIL "\n"); |