#!/bin/sh
##################################################################
#		D I F F D I R
#		-------------
# Description:
#	Printout which files differs between two directories.
#	The command is recursive.
#
# By:
#	Lars Berntzon, Cecilia Data AB.
#
##################################################################
dir1=$1
dir2=$2

(
    (cd $dir1; find . -type d -name CVS -prune -o -type f -print)
    (cd $dir2; find . -type d -name CVS -prune -o -type f -print)
) | sort -u | 
while read f
do
    if [ -f $dir1/$f -a -f $dir2/$f ]; then
	cmp $dir1/$f $dir2/$f > /dev/null 2>&1 || echo "different: $dir1/$f and $dir2/$f"
    elif [ -f $dir1/$f ]; then
	echo "missing: $dir2/$f"
    else
	echo "missing: $dir1/$f"
    fi
done | sed 's%/\./%/%g'
