12 |
|
|
13 |
|
## settings |
14 |
|
|
15 |
< |
# destination address |
16 |
< |
ADDRESS="dev@i-scream.org.uk" |
15 |
> |
# e-mail addresses |
16 |
> |
TOADDR="commits@i-scream.org.uk" |
17 |
> |
FROMADDR="commits@i-scream.org.uk" |
18 |
|
|
19 |
|
# cvs path |
20 |
< |
CVS="/home/cut/tdb1/bin/cvs" |
20 |
> |
CVS="/usr/bin/cvs" |
21 |
|
|
22 |
|
# cvs repository |
23 |
< |
CVSROOT="/usr/local/proj/co600_10/cvs" |
23 |
> |
CVSROOT="/cvs/i-scream" |
24 |
|
|
25 |
|
# temporary checkout directory (checked out modules already) |
26 |
< |
CHECKOUTDIR="/home/cut/tdb1/cvsscripttemp" |
26 |
> |
CHECKOUTDIR="/home/sites/www.i-scream.org.uk/cvsscripttemp" |
27 |
|
|
28 |
|
# path to cvs2cl |
29 |
< |
CVS2CLPATH="/home/cut/tdb1/bin/cvs2cl" |
29 |
> |
CVS2CLPATH="/home/sites/www.i-scream.org.uk/bin/cvs2cl2.pl" |
30 |
|
|
31 |
|
# command line args for cvs2cl |
32 |
< |
CVS2CLARGS="-w -r -b -t -U ${CVSROOT}/CVSROOT/users -l \"-dyesterday<today\" -g \"-d/usr/local/proj/co600_10/cvs\" -g \"-Q\"" |
32 |
> |
CVS2CLARGS="-w -r -b -t -U ${CVSROOT}/CVSROOT/users -l \"-dyesterday<today\" -g \"-d${CVSROOT}\" -g \"-Q\"" |
33 |
|
|
34 |
|
# cvs2cl command |
35 |
|
CVS2CL="${CVS2CLPATH} ${CVS2CLARGS}" |
37 |
|
# subject line |
38 |
|
SUBJECT="i-scream daily commit logs - " |
39 |
|
|
40 |
+ |
# full cvs update script |
41 |
+ |
FULLCVSUPDATE="/home/sites/www.i-scream.org.uk/bin/fullcvsupdate.sh" |
42 |
|
|
43 |
+ |
# path to sendmail |
44 |
+ |
SENDMAIL="/usr/sbin/sendmail" |
45 |
+ |
|
46 |
+ |
# cvslog webpage for this day :) |
47 |
+ |
DATE=`/bin/date --date="1 day ago" "+%Y/%m/%d"` |
48 |
+ |
CVSLOGURL="http://www.i-scream.org.uk/cgi-bin/cvslog.cgi?period=date&date=${DATE}" |
49 |
+ |
CVSLOGLINE="Viewable online at ${CVSLOGURL}" |
50 |
+ |
|
51 |
|
## code |
52 |
|
|
53 |
< |
cd ${CHECKOUTDIR} |
43 |
< |
${CVS} -d ${CVSROOT} -Q update -d |
53 |
> |
${FULLCVSUPDATE} |
54 |
|
|
55 |
< |
MODULES="CVSROOT documentation experimental misc source web" |
55 |
> |
MODULES=`ls ${CVSROOT}` |
56 |
|
|
57 |
< |
for MOD in ${MODULES}; do |
57 |
> |
cd ${CHECKOUTDIR} |
58 |
|
|
59 |
< |
${CVS2CL} ${MOD} |
59 |
> |
for MODULE in ${MODULES}; do |
60 |
> |
|
61 |
> |
${CVS2CL} ${MODULE} |
62 |
|
if test -r "ChangeLog"; then \ |
63 |
< |
cat ChangeLog | mailx -s "${SUBJECT}${MOD}" ${ADDRESS}; \ |
63 |
> |
( echo "To: ${TOADDR}"; echo "From: ${FROMADDR}"; \ |
64 |
> |
echo "Subject: ${SUBJECT}${MODULE}"; echo ${CVSLOGLINE}\ |
65 |
> |
echo; cat ChangeLog; \ |
66 |
> |
echo "." ) | ${SENDMAIL} ${TOADDR}; \ |
67 |
|
rm -f ChangeLog |
68 |
|
fi; |
69 |
|
|