Thomas, here's how I might do it:
First I would modify the commitinfo file in the CVSROOT and add a line to
execute a script. For example:
ALL /usr/local/cvsroot/CVSROOT/bin/commit-validation.sh $USER
Second I would write a simple hash table (email.hash) with the module name
and the email address of the person email should be sent to. For example:
module1 [EMAIL PROTECTED]
module2 [EMAIL PROTECTED]
module3 [EMAIL PROTECTED]
etc...etc...
Third I would write the following script and save it to the path noted in
the commitinfo file:
####
#! /usr/bin/ksh
homedir=/usr/local/cvsroot/CVSROOT/bin
username=${1}
filename=${3}
modulename=$(print $2 | cut -d '/' -f 5)
logdate=$(date '+%m%d%y')
print "CVS Username: ${username}" > ${homedir}/email.hopper
print "CVS Module: ${modulename}" >> ${homedir}/email.hopper
print "Modification Date: ${logdate}" >> ${homedir}/email.hopper
email=$(nawk "/^${modulename}/ { print \$2 }" < ${homedir}/email.hash)
mailx -s"${modulename} - modified" ${email} < ${homedir}/email.hopper
exit 0
####
Of course, this is a simplified version of a more robust mail serving
process that is possible through the loginfo file where you can grab the
entire contents of the log message and mail it to someone.
Hope this helps... Cheers, Tracy.
-----Original Message-----
From: Tomáš Velek [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 20, 2000 2:51 AM
To: [EMAIL PROTECTED]
Subject: Informing others about commits
Hello,
don't you know where is described (with details if it's possible) creating
of scripts?
I need email to be send to concrete people, after the concrete event (mostly
commit or add and delete). To which people, it dependes on which modul was
commited.
I know that the file 'loginfo' serves to it, but from the available help I
didn't realize exactly, how should the content of this file look.
Next question: Where can I edit in CVS SMTP address of my server.
Thanks for every help.
Tomas
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs