alliance/CVSROOT/postconfig

66 lines
1.4 KiB
Bash
Executable File

#! /bin/sh
#
# Author : Olivier.Sirol@lip6.fr
# Date : sept 1999
# Description :
#
# (C) Czo 1998,99
# This code is released under GPL
#
# $Id: postconfig,v 1.12 1999/09/23 18:44:52 czo Exp $
#
PATH=/asim/gnu/bin:/usr/ucb:/usr/etc:/bin:${PATH}
TMPFILE=/tmp/cvslog.$$
FINGER=`who am i | gawk '{gsub(/^[^!]*!/,""); print $1}'`
(
echo "===================================================================="
echo "Modification le : `date`"
echo "Par : $FINGER"
echo "===================================================================="
echo ""
cat
) > "$TMPFILE"
MAIL_SUBJECT=`cat "$TMPFILE" | gawk '
/Update of \/users\/outil1\/alliance\/cvsroot\// {
gsub(/Update of \/users\/outil1\/alliance\/cvsroot\//, "");
gsub(/alliance\//, "");
gsub(/share\//, "");
gsub(/sources\//, "");
SUJ=$0
}
END {
printf("CVS loginfo, %s", SUJ)
}'`
UPDATE=`cat "$TMPFILE" | gawk '
/Update of \/users\/outil1\/alliance\/cvsroot\// {
gsub(/Update of \/users\/outil1\/alliance\/cvsroot\//, "\/users\/outil1\/alliance\/latest\/");
SUJ=$0
}
END {
printf("%s", SUJ)
}'`
#echo $UPDATE
#exit 7
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/outil1/alliance/cvsroot
cd "$UPDATE"
cvs -q update -d -P &
# chgrp -R alliance /users/outil1/alliance/latest
rm -f "$TMPFILE" dummy
exit 0