info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: Needs CVS email notification help !


From: CASAMASSIMA ANTONELLA
Subject: R: Needs CVS email notification help !
Date: Tue, 4 Apr 2006 10:05:37 +0200

This is my example on solaris box I think is not very different on
yours.
I've put this in crontab to run daily but you can schedule as you want.

#!/usr/bin/sh 
data=`date '+%m%d%y'`
LOG=/tmp/cvslog$data.out
FILEDIFF=/tmp/cvs.diff
FILEDIFF1=/tmp/cvs1.diff
APPO=/tmp/appo
SPATH=/export/home/user_a
#beginning elab
date > $LOG
#-d directory not recursive ;-g group not printed ;-o owner not printed
;-rt ordered descending
#ls -dgort /cvsrep/* > $FILEDIFF1
ls -ldort /cvsrep/* > $FILEDIFF1
cut -b16-27,32-45,53-100 $FILEDIFF1 > $APPO
cat $APPO > $FILEDIFF1 

diff $FILEDIFF  $FILEDIFF1 > $APPO
#Testo l'esito del comando diff
case "$?" in 
        0)
                echo "0) NOTHING NEW" >> $LOG
                exit 1
        ;;

        1)
                echo "1) THERE ARE VARs" >> $LOG
                echo "NewFIles" >> $LOG
                cat $APPO | grep '>' | cut -b2-100 >> $LOG 
                echo "RemovedFiles" >>$LOG
                cat $APPO | grep '<' | cut -b2-100 >> $LOG 
                
                #SEnd MAIL  to cvsadmin
                su - cvsuser -c "mail -tw -m ALERT address@hidden <
$LOG
                EOF "
                
                
                cat $FILEDIFF1 > $FILEDIFF
        ;;

        *)
                echo "*) ERROR $? " >> $LOG
                err="$?"
                exit 5
                
        ;;
esac
#end elabowithout errs
date >> $LOG
exit 0

-----Messaggio originale-----
Da: address@hidden
[mailto:address@hidden Per conto di
address@hidden
Inviato: 04 April, 2006 02:58
A: address@hidden
Oggetto: Needs CVS email notification help !

Hello cvs gurus,

I am new to the list and needs your help.

First:

Server Linux Redhat 9.0
cvs version cvs-1.12.6

Second: I have search through the list and find somes questions are
close to what I am looking for, but not exactly.
Meaning some ask about loginfo file and got the answer, but what I am
looking for is  a little more specific.

Regarding loginfo. We do have cvs-log in our loginfo. But this is more
for searching ^module and trigger email script for notify. That part is
working for us, but our modules has a very deep directory structure.

So my question is: how can I have a trigger email notify for a specific
directory under out main modules when our users commit a checkin.

IE: my modules directory like:

/cvs/cvsroot/Repository/projects/

under /projects we have:

projects/sofware, hwware, thirdparty, drivers ...and so on.

Nowe I want a trigger to send email if any one that are commit file(s)
under drivers directory.

I hope I am make sense to you all. If not please let me know.

Thank you for your help.

De-


_______________________________________________
info-cvs mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/info-cvs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]