diff options
author | joe <joe@FreeBSD.org> | 2001-01-16 02:02:39 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-01-16 02:02:39 +0800 |
commit | 4aa14b6023795471b845fa109b6212f16bd6350f (patch) | |
tree | bf061126b36b89a41258821c169af3a5fac506f2 | |
parent | 5e6f0b22cff37c0262ba4dc3d2f455b7678a0c7d (diff) | |
download | freebsd-ports-gnome-4aa14b6023795471b845fa109b6212f16bd6350f.tar.gz freebsd-ports-gnome-4aa14b6023795471b845fa109b6212f16bd6350f.tar.zst freebsd-ports-gnome-4aa14b6023795471b845fa109b6212f16bd6350f.zip |
Begin the tidy-up to make these scripts easier for third parties to use.
Move the mail command and email recipients to the top of the script where
they are easier to modify.
-rwxr-xr-x | CVSROOT/log_accum.pl | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index fc8918833ca5..bad22e21e3db 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -39,6 +39,35 @@ $rcsidinfo = 2; # Debug level, 0 = off $debug = 0; + +# The command used to mail the log messages. Usually something +# like '/usr/sbin/sendmail'. +$MAILCMD = "/usr/local/bin/mailsend -H"; + + +# Email addresses of recipients of commit mail. +$MAILADDRS = 'cvs-committers@FreeBSD.org cvs-all@FreeBSD.org'; + + +#------------------------------------------------------- +# FreeBSD site localisation +# Remember to comment out if using for other purposes. +#------------------------------------------------------- +if (hostname() =~ /^(freefall|internat)\.freebsd\.org$/i) { + $freebsd = 1; + if ($1 =~ /freefall/i) { + $crypto = ''; + $meister = 'peter@FreeBSD.org'; + } else { + $crypto = 1; + $meister = 'markm@FreeBSD.org'; + } +} +if ($debug && $freebsd) { + $MAILADDRS = $meister; +} + + ############################################################ # # Constants @@ -345,12 +374,7 @@ sub mail_notification { print "Mailing the commit message...\n"; @mailaddrs = &read_logfile("$MAIL_FILE.$id", ""); - - if ($debug or !$freebsd) { - open(MAIL, "| /usr/local/bin/mailsend -H $owner$dom"); - } else { - open(MAIL, "| /usr/local/bin/mailsend -H cvs-committers$dom cvs-all$dom"); - } + open MAIL, "| $MAILCMD $MAILADDRS" or die 'Please check $MAILCMD.'; # This is turned off since the To: lines go overboard. @@ -454,22 +478,6 @@ sub format_summaries { # Setup environment # umask (002); -$host = hostname(); -if ($host =~ /^(freefall|internat)\.freebsd\.org$/i) { - $freebsd = 1; - $dom = '@FreeBSD.org'; - if ($1 =~ /freefall/i) { - $crypto = ''; - $owner = 'peter'; - } else { - $crypto = 1; - $owner = 'markm'; - } -} else { - $freebsd = $crypto = ''; - $owner = 'postmaster'; # Change this!!! - $dom = ''; # Change this!! -} # # Initialize basic variables |