head	1.5;
access;
symbols
	V1-1-2:1.5
	V1-0-4:1.3.2.2
	V1-0-3:1.3.2.2
	V1-0-2:1.3.2.2
	ePit-1-0:1.3.2.2.0.2
	V1-0-1-ePit-1:1.3.2.2
	V1-0-1:1.3.2.1
	V1-1-0:1.4
	STABLE-BRANCH-1-0:1.3.0.2
	DEVEL-BRANCH-1-1:1.3
	V1-0-0:1.3
	V0-9-11:1.3
	V0-9-10:1.3
	V0-9-9:1.3
	V0-9-8:1.3
	V0-9-7:1.3
	V0-9-6:1.3
	V0-9-5:1.3
	V0-9-4:1.3
	V0-9-3:1.3
	V0-9-2:1.3
	V0-9-1:1.2
	V0-9-0:1.2
	V0-4-5:1.2;
locks; strict;
comment	@# @;


1.5
date	99.12.31.11.44.28;	author wkoch;	state Exp;
branches;
next	1.4;

1.4
date	99.10.26.12.14.32;	author wkoch;	state Exp;
branches;
next	1.3;

1.3
date	99.01.16.08.29.26;	author koch;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	98.11.27.14.33.30;	author koch;	state Exp;
branches;
next	1.1;

1.1
date	98.11.27.11.42.49;	author koch;	state Exp;
branches;
next	;

1.3.2.1
date	99.09.23.07.55.12;	author wkoch;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2000.02.09.14.35.37;	author wkoch;	state Exp;
branches;
next	;


desc
@@


1.5
log
@See ChangeLog: Fri Dec 31 12:48:31 CET 1999  Werner Koch
@
text
@#!/bin/bash
# need a Posix shell, so we simply use bash

set -e

uid=`id -u`
date=`date`
name=$(awk -F: "\$3==$uid { print \$5 }" /etc/passwd )
addr="<`id -un`@@`hostname -d`>"

for i in `find . -name Changes -print`; do
    dir=`dirname $i`
    if [ -s $dir/Changes ]; then
	awk '
	state == 0 && /^[ \t]*$/  { next }
	state == 0  { state = 1 }
	/^[ \t]*$/ { empty++; next }
		   { while ( empty > 0 ) { print ""; empty--; }; print  }
	' < $dir/Changes > $dir/Changes.tmp
	if [ -s $dir/Changes.tmp ]; then
	    lines=`wc -l <$dir/Changes.tmp`
	    echo "$date  $name  $addr" >$dir/ChangeLog.new
	    echo >>$dir/ChangeLog.new
	    cat $dir/Changes.tmp   >>$dir/ChangeLog.new
	    echo >>$dir/ChangeLog.new
	    [ -f $dir/ChangeLog ] && cat $dir/ChangeLog >>$dir/ChangeLog.new
	    echo -n > $dir/Changes
	    [ -f $dir/ChangeLog ] && rm $dir/ChangeLog
	    mv $dir/ChangeLog.new $dir/ChangeLog
	    echo "$lines new lines in $dir/ChangeLog"
	fi
	rm $dir/Changes.tmp || true
    fi
done

# Execute canned cvs remove commands
for i in `find . -name cvs-remove -print`; do
    dir=`dirname $i`
    if [ -s $dir/cvs-remove ]; then
	here=`pwd`
	cd $dir
	if cvs remove -f `cat cvs-remove`; then
	    rm cvs-remove
	fi
	cd $here
    fi
done

# Execute canned cvs add commands
for i in `find . -name cvs-add -print`; do
    dir=`dirname $i`
    if [ -s $dir/cvs-add ]; then
	here=`pwd`
	cd $dir
	if cvs add `cat cvs-add`; then
	    rm cvs-add
	fi
	cd $here
    fi
done

cvs -z3 commit -m "See ChangeLog: $date  $name" $*

@


1.4
log
@See ChangeLog: Tue Oct 26 14:10:21 CEST 1999  Werner Koch
@
text
@d62 1
a62 1
cvs commit -m "See ChangeLog: $date  $name" $*
@


1.3
log
@See ChangeLog: Sat Jan 16 09:27:30 CET 1999  Werner Koch
@
text
@d14 19
a32 9
	lines=`wc -l <$dir/Changes`
	echo "$date  $name  $addr" >$dir/ChangeLog.new
	echo >>$dir/ChangeLog.new
	cat $dir/Changes   >>$dir/ChangeLog.new
	[ -f $dir/ChangeLog ] && cat $dir/ChangeLog >>$dir/ChangeLog.new
	echo -n > $dir/Changes
	[ -f $dir/ChangeLog ] && rm $dir/ChangeLog
	mv $dir/ChangeLog.new $dir/ChangeLog
	echo "$lines new lines in $dir/ChangeLog"
@


1.3.2.1
log
@See ChangeLog: Thu Sep 23 09:52:58 CEST 1999  Werner Koch
@
text
@d14 9
a22 19
	awk '
	state == 0 && /^[ \t]*$/  { next }
	state == 0  { state = 1 }
	/^[ \t]*$/ { empty++; next }
		   { while ( empty > 0 ) { print ""; empty--; }; print  }
	' < $dir/Changes > $dir/Changes.tmp
	if [ -s $dir/Changes.tmp ]; then
	    lines=`wc -l <$dir/Changes.tmp`
	    echo "$date  $name  $addr" >$dir/ChangeLog.new
	    echo >>$dir/ChangeLog.new
	    cat $dir/Changes.tmp   >>$dir/ChangeLog.new
	    echo >>$dir/ChangeLog.new
	    [ -f $dir/ChangeLog ] && cat $dir/ChangeLog >>$dir/ChangeLog.new
	    echo -n > $dir/Changes
	    [ -f $dir/ChangeLog ] && rm $dir/ChangeLog
	    mv $dir/ChangeLog.new $dir/ChangeLog
	    echo "$lines new lines in $dir/ChangeLog"
	fi
	rm $dir/Changes.tmp || true
@


1.3.2.2
log
@See ChangeLog: Wed Feb  9 15:33:44 CET 2000  Werner Koch
@
text
@d62 1
a62 1
cvs -z3 commit -m "See ChangeLog: $date  $name" $*
@


1.2
log
@See ChangeLog: Fri Nov 27 15:30:24 CET 1998  Werner Koch
@
text
@d26 26
@


1.1
log
@See ChangeLog: Fri Nov 27 12:39:29 CET 1998  Werner Koch
@
text
@a17 1
	echo >>$dir/ChangeLog.new
@
