echo "Needs update !"

exit 1
#
# Update htdig from mifluz files
#

if [ "$1" ]
then
	copy="echo cp"
else
	: copy=cp
fi

TAG=" -r htdig-3-2-x "

#
# Extract/sync with current state of htdig development
#
if [ ! -d htdig3 ]
then
	cvs -z3 -d :pserver:$LOGNAME@cvs.htdig.org:/opt/htdig/cvs checkout $TAG htdig3
fi

if [ ! -d htdig3 ]
then
	echo "Could not sync with htdig3 cvs server" >&2
	exit 1
fi

#
# Sync htlib,htword files
#
cat scripts/htlibhtword_files | while read mifluz htdig
do
	if cmp mifluz/$mifluz htdig3/$htdig
	then : 
	else
		diff -c htdig3/$htdig mifluz/$mifluz
		$copy mifluz/$mifluz htdig3/$htdig
	fi
done

#
# Sync db, htdb files
#
for list in scripts/db_files scripts/htdb_files
do
	cat $list | while read file 
	do
		if cmp $file htdig3/$file
		then :
		else	
			diff -c htdig3/$file $file
			$copy $file htdig3/$file
		fi
	done
done

echo '
------------------------------------------------------------------
Now resolve possible conflicts and test that it compiles/test/dist

cd htdig3 ; cvs -q -z3 update -d 
./configure --enable-maintainer-mode --enable-tests
make ; make check ; make distcheck

When finished, copy the appropriate from mifluz ChangeLog to
htdig ChangeLog. All lines starting with {db,htdb,mifluz} must
be copied. * mifluz/ must be replaced by * htword/ or * htlib/
where appropriate. When done add a ChangeLog entry in mifluz
ChangeLog that is looks like this:

Tue Feb 15 17:25:20 2000  Loic Dachary  <loic@ceic.com>

	* Sync htdig

so that you can use it at a later time to easily find out what
you need to copy to htdig ChangeLog.

cvs -q -z3 commit -m "<ChangeLog lines>"
'
