1 |
tdb |
1.1 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
#--------------------------------------------------------- |
4 |
|
|
# cvslog.sh |
5 |
|
|
# |
6 |
|
|
# Script to send daily cvslog e-mails. |
7 |
|
|
# Written by Tim Bishop [tdb1@ukc.ac.uk] 26/01/2001 |
8 |
|
|
# |
9 |
|
|
# Copyright i-Scream, 2000 |
10 |
|
|
# http://www.i-scream.org.uk |
11 |
|
|
#--------------------------------------------------------- |
12 |
|
|
|
13 |
|
|
## settings |
14 |
|
|
|
15 |
tdb |
1.2 |
# e-mail addresses |
16 |
tdb |
1.3 |
TOADDR="commits@i-scream.org.uk" |
17 |
tdb |
1.2 |
FROMADDR="tim@i-scream.org.uk" |
18 |
tdb |
1.1 |
|
19 |
|
|
# cvs path |
20 |
tdb |
1.2 |
CVS="/usr/bin/cvs" |
21 |
tdb |
1.1 |
|
22 |
|
|
# cvs repository |
23 |
tdb |
1.2 |
CVSROOT="/cvs/i-scream" |
24 |
tdb |
1.1 |
|
25 |
|
|
# temporary checkout directory (checked out modules already) |
26 |
tdb |
1.2 |
CHECKOUTDIR="/home/sites/www.i-scream.org.uk/cvsscripttemp" |
27 |
tdb |
1.1 |
|
28 |
|
|
# path to cvs2cl |
29 |
tdb |
1.2 |
CVS2CLPATH="/home/sites/www.i-scream.org.uk/bin/cvs2cl.pl" |
30 |
tdb |
1.1 |
|
31 |
|
|
# command line args for cvs2cl |
32 |
tdb |
1.2 |
CVS2CLARGS="-w -r -b -t -U ${CVSROOT}/CVSROOT/users -l \"-dyesterday<today\" -g \"-d${CVSROOT}\" -g \"-Q\"" |
33 |
tdb |
1.1 |
|
34 |
|
|
# cvs2cl command |
35 |
|
|
CVS2CL="${CVS2CLPATH} ${CVS2CLARGS}" |
36 |
|
|
|
37 |
|
|
# subject line |
38 |
|
|
SUBJECT="i-scream daily commit logs - " |
39 |
|
|
|
40 |
tdb |
1.2 |
# full cvs update script |
41 |
|
|
FULLCVSUPDATE="/home/sites/www.i-scream.org.uk/bin/fullcvsupdate.sh" |
42 |
|
|
|
43 |
tdb |
1.3 |
# path to sendmail |
44 |
|
|
SENDMAIL="/usr/sbin/sendmail" |
45 |
|
|
|
46 |
tdb |
1.1 |
|
47 |
|
|
## code |
48 |
|
|
|
49 |
tdb |
1.2 |
${FULLCVSUPDATE} |
50 |
|
|
|
51 |
|
|
MODULES=`ls ${CVSROOT}` |
52 |
|
|
|
53 |
tdb |
1.1 |
cd ${CHECKOUTDIR} |
54 |
|
|
|
55 |
tdb |
1.2 |
for MODULE in ${MODULES}; do |
56 |
tdb |
1.1 |
|
57 |
tdb |
1.2 |
${CVS2CL} ${MODULE} |
58 |
tdb |
1.1 |
if test -r "ChangeLog"; then \ |
59 |
tdb |
1.2 |
( echo "To: ${TOADDR}"; echo "From: ${FROMADDR}"; \ |
60 |
|
|
echo "Subject: ${SUBJECT}${MODULE}"; cat ChangeLog; \ |
61 |
tdb |
1.3 |
echo "." ) | ${SENDMAIL} ${TOADDR}; \ |
62 |
tdb |
1.1 |
rm -f ChangeLog |
63 |
|
|
fi; |
64 |
|
|
|
65 |
|
|
done |