1#!/bin/sh
2############################################################################
3
4moduledir=${0%/[^/]*}
5module=${moduledir##*/}
6cvs2cl=$HOME/store/cvs/cvs2cl/cvs2cl.pl
7headerfile=/tmp/$module.header
8
9cd $moduledir
10
11############################################################################
12cat > $headerfile <<ENDOFHEADER
13ChangeLog
14=========
15
16This is the ChangeLog file for the $module module.  This file is automatically
17generated every night.  Entries are in reversed chronological order.
18
19See http://www.red-bean.com/~kfogel/cvs2cl.shtml for information about the
20cvs2cl script used to generate this file.
21
22============================================================================
23
24ENDOFHEADER
25############################################################################
26
27cvs update -dP
28
29cvs log | $cvs2cl --stdin --header $headerfile --separate-header --prune \
30  --ignore 'ChangeLog$' \
31  --ignore '(Makefile\.in|configure|aclocal\.m4|config\.sub|config\.guess)$' \
32  --ignore '(ltconfig|ltmain\.sh|missing|mkinstalldirs|stamp-h.*|install-sh)$' \
33  --ignore 'config\.h\.in$'
34
35rm ChangeLog.bak $headerfile
36
37cvs commit -m "Automatic ChangeLog generation" ChangeLog
38
39