head	1.3;
access;
symbols
	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.3
date	99.01.16.08.29.26;	author koch;	state Exp;
branches;
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	;


desc
@@


1.3
log
@See ChangeLog: Sat Jan 16 09:27:30 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
	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"
    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 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
@
