head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	99.10.09.20.05.59;	author jsm;	state dead;
branches;
next	1.2;

1.2
date	99.02.08.15.16.10;	author jsm;	state Exp;
branches;
next	1.1;

1.1
date	99.02.08.15.09.22;	author jsm;	state Exp;
branches;
next	;


desc
@@


1.3
log
@
1999-10-09  Jason Molenda  (jsm@@bugshack.cygnus.com)

	* CVSROOT/auto_checkout, CVSROOT/commit_prep, CVSROOT/log_accum:
	Deleted; generic versions now used for all repositories.

	* CVSROOT/commitinfo, CVSROOT/loginfo:  Change pathnames to
	generic versions.

        * CVSROOT/checkoutlist:  Don't try to check out the removed
        files any longer.
@
text
@#!/bin/sh

/bin/date

# cvs only substitutes one % format character in the log_info line,
# so we have to do both the update-mailing and the cvs update in this
# script.  commit_prep and log_accum do not correctly find each other
# when we run log_accum from this script (It looks like the magic
# filename they use in /tmp has a pid or something that get confused
# when log_accum is run from here), so we just send out a bogus little
# by-hand update note.

# $1 is of the format "WEB_PAGE_DIRNAME" with the last component being 
# the project's name

# $2 is of the format "DIRECTORYNAME FILENAME" with no final slash on DNAME.
# DNAME is the directory name inside the project's CVS repository.  e.g.
# $2 can look like "htdocs index.html,1.3 foo.html,1.5"


SHORTNAMES=`echo $2 | sed 's|,[^ ]*||g'`
REPONAME=`echo $1 | sed -e 's,/www/sourceware/htdocs/,,' -e 's,/.*$,,'`

####------------------------------------------
#   Update the web pages
####------------------------------------------

# try to avoid a race (this kludge from the cvs docs)
/bin/sleep 2
cd $1

DIRNAME=`echo $2 | sed -e 's, .*,,' -e 's,^htdocs$,.,' -e 's,htdocs,.,'`
/usr/local/bin/cvs -q update -d -P -l $DIRNAME


# DIRNAME has the last component of the directory name; $1 has the
# full prefix.  Combine them to get into the final real directory.

cd $1/$DIRNAME

####------------------------------------------
#   Send mail notification about the update 
####------------------------------------------

firstfile=`echo $2 | sed -e 's,^[^ ]* ,,' -e 's, .*,,'`
filename=`echo $firstfile | sed 's|,[^,]*$||'`
fileversion=`echo $firstfile | sed 's|^.*,||'`

QMAILHOST=sourceware.cygnus.com
export QMAILHOST
(
  echo Files modified in the $REPONAME repository.  Log entry:
  echo ""
  /usr/local/bin/cvs log -N -r$fileversion $filename | sed -e '1,/^date: /d' -e '$d'
) |
  /bin/mail -s "$SHORTNAMES" ${REPONAME}-webpages-cvs@@sourceware.cygnus.com

exit 0
@


1.2
log
@Oops, small typeo.
@
text
@@


1.1
log
@Standard sourceware CVS setup.
@
text
@d56 1
a56 1
  /bin/mail -s "$SHORTNAMES" REPONAME}-webpages-cvs@@sourceware.cygnus.com
@

