Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2006 22:26:29 -0700
From:      MC <rossiya@gmail.com>
To:        MC <rossiya@gmail.com>, freebsd-ports@freebsd.org
Subject:   Re: Basic Diff question
Message-ID:  <28a99ba50609182226g7cd0013y9d74e012feefcf50@mail.gmail.com>
In-Reply-To: <20060918230008.GB89966@iib.unsam.edu.ar>
References:  <28a99ba50609181526s6a3ab59btfca1d6517b89c951@mail.gmail.com> <20060918230008.GB89966@iib.unsam.edu.ar>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the quick replies.  They got me to thinking and I whipped up this
little bach script that seems equal to the task:

virtual7:/usr/ports/math/ffff # cat diffOMatic.sh
#Takes two arguments which are old/ and new/ respectively
diffOMatic() { ( cd $1/; find . -type f ) | while read f; do
#echo $f
if [ -f "$2/$f" ]; then
cp -n $1/$f "$2/$f".orig
( cd $2/; diff --ignore-all-space -u "$f".orig $f; )
rm "$2/$f".orig
fi;
done
}

diffOMatic work/FFFF323-src/ FFFF323-src/

Output compared well to a straight dirr -rn /old/  new/, however it doesn't
[yet] handle the case of missing files.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28a99ba50609182226g7cd0013y9d74e012feefcf50>