#!/usr/bin/perl # # rotateandmail.pl: produce CVS commit summary emails # # Copyright (c) 2001 Paul Warren. All rights reserved. # # $Log: rotateandmail.pl,v $ # Revision 1.1 2001/10/02 20:04:55 pdw # parrot_html # # $rcsid = '$Id: rotateandmail.pl,v 1.1 2001/10/02 20:04:55 pdw Exp $'; my $recipients='INSERT RECIPIENTS HERE'; my $brecipients='INSERT BCC RECIPIENTS HERE'; my $file = shift @ARGV; system("lockfile $file.lock"); system("mv $file $file.1"); system("touch $file"); system("rm -f $file.lock"); my $data=`/home/pdw/bin/analysecommits.pl $file.1`; my $t1 = `date -d '7 days ago' +'\%d \%b'`; chomp($t1); my $t2 = `date +'\%d \%b'`; chomp($t2); open POUT, "| /usr/lib/sendmail -t -bm"; print POUT < To: $recipients Bcc: $brecipients Subject: Gnome CVS activity $t1 to $t2 Gnome CVS activity $t1 to $t2 $data NB These statistics are largely meaningless - they count CVS commits, which are only a very rough indicator of actual progress of a project. Paul EOF close POUT;