3 # $NetBSD: pkgdiff,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $
5 # Id: pkgdiff,v 1.4 2000/05/14 01:04:54 feyrer Exp feyrer
7 # Usage: pkgdiff oldfile newfile
9 # Will output a patch ready for the NetBSD Pkgs Collection (unified
10 # diff, plus no RCS IDs if possible).
12 # Copyright (c) 2000 by Hubert Feyrer <hubertf@netbsd.org>
13 # All Rights Reserved. Absolutely no warranty.
18 echo $0: need at least two arguments >&2
23 while [ `diff -u -$lines "$@" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
25 lines=`expr $lines - 1`
26 if [ $lines = 0 ]; then
27 echo "Cannot strip away RCS IDs, please handle manually!"
32 if ! diff -qu -$lines "$@" > /dev/null