#
# Produces a diff to update mifluz from htdig3
#

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

if [ ! -d ../htdig3 ]
then
	echo "No ../htdig3 directory" >&2
	exit 1
fi

#
# db
#
ls -d db/* | grep -v Makefile | while read i ; do if [ -f $i ] ; then diff -c $i ../htdig3/$i ; fi ; done
#
# htdb
#
ls -d htdb/* | grep -v Makefile | while read i ; do if [ -f $i ] ; then diff -c $i ../htdig3/$i ; fi ; done
#
# htlib
#
( cd mifluz ; ls | grep -v Makefile | while read i ; do if [ -f $i -a -f ../../htdig3/htlib/$i ] ; then ( cd .. ; diff -b -c mifluz/$i ../htdig3/htlib/$i ) ; fi ; done )
#
# test
#
ls -d test/* | grep -v Makefile | grep -v test_functions | grep -v test_prepare  | while read i ; do if [ -f $i ] ; then diff -c $i ../htdig3/$i ; fi ; done
#
# htword
#
( cd mifluz ; ls | grep -v Makefile | while read i ; do if [ -f $i -a -f ../../htdig3/htword/$i ] ; then ( cd .. ; diff -b -c mifluz/$i ../htdig3/htword/$i ) ; fi ; done )

