93 lines
2.1 KiB
Bash
Executable File
93 lines
2.1 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Filename: postconfig
|
|
# Copyright (C) 1999, 2000 Czo <Olivier.Sirol@lip6.fr>
|
|
# License: GPL (http://www.gnu.org/copyleft/gpl.html)
|
|
# Started: Sept 1999
|
|
# Last Change: Thursday 07 September 2000, 09:56
|
|
# Edit Time: 0:14:48
|
|
# Description:
|
|
#
|
|
# $Id: postconfig,v 1.35 2000/09/07 07:56:18 czo Exp $
|
|
#
|
|
|
|
PATH=/asim/gnu/bin:/usr/ucb:/usr/etc:/usr/local/bin:/bin:/usr/bin:${PATH}
|
|
TMPFILE=/tmp/cvslog.$$
|
|
FINGER=`who am i | gawk '{gsub(/^[^\!]*\!/,""); print $1}'`
|
|
|
|
(
|
|
echo "===================================================================="
|
|
echo "Modification le : `date`"
|
|
echo "Par : $USER"
|
|
echo "===================================================================="
|
|
echo ""
|
|
cat
|
|
) > "$TMPFILE"
|
|
|
|
UPDATE_DIR=`cat "$TMPFILE" | gawk '
|
|
/^Update of \/users\/outil\/alliance\/cvsroot\// {
|
|
gsub(/^Update of \/users\/outil\/alliance\/cvsroot\//, "");
|
|
SUJ=$0
|
|
}
|
|
END {
|
|
printf("%s", SUJ)
|
|
}'`
|
|
|
|
UPDATE_IN=`cat "$TMPFILE" | gawk '
|
|
/^In directory / {
|
|
gsub(/^In directory [^:]*:/, "");
|
|
SUJ=$0
|
|
}
|
|
END {
|
|
printf("%s", SUJ)
|
|
}'`
|
|
|
|
MODIFIED_FILES=`cat "$TMPFILE" | gawk '
|
|
/^Modified Files:/ { start=1; next}
|
|
/^Log Message:/ { start=0; }
|
|
{if (start) MFILES=MFILES " " $0 ;}
|
|
END {
|
|
printf("%s", MFILES)
|
|
}'`
|
|
|
|
MAIL_SUBJECT=`echo "CVS loginfo, $UPDATE_DIR" | sed 's§alliance/§§' | sed 's§share/§§' | sed 's§sources/§§'`
|
|
|
|
# echo $UPDATE_DIR
|
|
# echo $UPDATE_IN
|
|
# echo $MAIL_SUBJECT
|
|
# echo $MODIFIED_FILES
|
|
|
|
|
|
# pwd
|
|
(
|
|
echo ""
|
|
echo "===================================================================="
|
|
echo "Diff"
|
|
echo ""
|
|
|
|
cd $UPDATE_IN
|
|
# cvs diff $MODIFIED_FILES | head -50
|
|
echo ""
|
|
echo "===================================================================="
|
|
echo "Ce message est envoyé au personnes abonnées à alliance-programmers"
|
|
echo "Pour plus d'information sur cette mailling-list, visitez :"
|
|
echo "http://www-asim.lip6.fr/alliance/mailing-lists/"
|
|
) >> "$TMPFILE"
|
|
# pwd
|
|
|
|
# cat $TMPFILE
|
|
|
|
cat "$TMPFILE" >> $CVSROOT/CVSROOT/log-commit
|
|
cat "$TMPFILE" | mail -s "ALC : $MAIL_SUBJECT" alliance-programmers@asim.lip6.fr
|
|
|
|
|
|
# find cvsroot -type d | xargs chmod g+s
|
|
# devrait marcher...
|
|
# chgrp -R alliance /users/outil/alliance/cvsroot
|
|
# cvs -q update -d -P & en crontab ....
|
|
|
|
rm -f "$TMPFILE" dummy
|
|
|
|
exit 0
|
|
|