CVSROOT ciabot,NONE,1.1 checkoutlist,1.2,1.3 loginfo,1.25,1.26
Nathaniel Smith <[email protected]> Sun, 01 Jun 2003 17:54:52 -0500
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/CVSROOT
In directory purcel:/tmp/cvs-serv28190
Modified Files:
checkoutlist loginfo
Added Files:
ciabot
Log Message:
Add support for scanline's now-public CIA bot.
--- NEW FILE: ciabot ---
#!/bin/bash
# This version hacked by njs to include module name.
# It should be called as "ciabot %{}" from loginfo.
message=`cat`
uname=`id -un`
lineno=`echo "$message" | grep -n "Log Message:" | awk -F: ' { print $1 } '`
message=`echo "$message" | sed "1,${lineno}d"`
projectname="Fresco"
tmpfile="/tmp/$RANDOM-$projectname"
message=`echo "$message" | head -n 5`
module=`echo $1 | cut -d/ -f1`
cat <<EOF >$tmpfile
From: [email protected]
To: [email protected]
Content-Type: text/plain;
Subject: Announce $projectname
commit by $uname to $module: $message
EOF
if [ -e /tmp/lastlog-$projectname ]; then
if ! diff /tmp/lastlog-$projectname $tmpfile &>/dev/null; then
# there are differences, so this is a different commit
cat $tmpfile | /usr/sbin/sendmail -t
mv $tmpfile /tmp/lastlog-$projectname
else
# it's just cvs spamming us from another directory
rm $tmpfile
fi
else
cat $tmpfile | /usr/sbin/sendmail -t
mv $tmpfile /tmp/lastlog-$projectname
fi
Index: checkoutlist
===================================================================
RCS file: /cvs/fresco/CVSROOT/checkoutlist,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- checkoutlist 13 Jan 2003 05:25:48 -0000 1.2
+++ checkoutlist 1 Jun 2003 22:54:49 -0000 1.3
@@ -12,3 +12,4 @@
#
# comment lines begin with '#'
syncmail
+ciabot
Index: loginfo
===================================================================
RCS file: /cvs/fresco/CVSROOT/loginfo,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- loginfo 21 Jan 2003 07:56:23 -0000 1.25
+++ loginfo 1 Jun 2003 22:54:49 -0000 1.26
@@ -26,11 +26,6 @@
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
^web cat >/dev/null ; mail -s "cvs update web" [email protected]
^CVSROOT mail -s "Fresco CVSROOT change notification." [email protected]
-# These don't work anyway
-#^Fresco(/|$) mail -s "Fresco CVS commit notification." [email protected] ; echo "" | mail -s "cvs update Fresco" [email protected]
-#^Fresco98(/|$) mail -s "*Fresco98* CVS commit notification." [email protected]
-#^Berlin98(/|$) mail -s "*Berlin98* CVS commit notification." [email protected]
-#^Fresco $CVSROOT/CVSROOT/syncmail -u --fromhost=fresco.org [email protected] %{sVv} [email protected]
-ALL $CVSROOT/CVSROOT/syncmail -u --fromhost=fresco.org [email protected] %{sVv} [email protected]
-#DEFAULT mail -s "Fresco CVS commit notification." [email protected] ; echo "" | mail -s "cvs update Fresco" [email protected]
DEFAULT echo "" | mail -s "cvs update Fresco" [email protected]
+ALL $CVSROOT/CVSROOT/ciabot ${}
+ALL $CVSROOT/CVSROOT/syncmail -u --fromhost=fresco.org [email protected] %{sVv} [email protected]