pkgdiff now only generates output at all if the files differ.

mkpatches doesn't generate empty patches, and warns if name and name.orig
don't differ.
Bump version to 0.91.
This commit is contained in:
wiz 2000-07-01 02:38:55 +00:00
parent 1e2c5c32df
commit 13f99fafda
3 changed files with 22 additions and 9 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $
# $NetBSD: Makefile,v 1.2 2000/07/01 02:38:55 wiz Exp $
#
DISTNAME= pkgdiff-0.90
DISTNAME= pkgdiff-0.91
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1,6 +1,6 @@
#!@PREFIX@/bin/perl
#
# $NetBSD: mkpatches.pl,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $
# $NetBSD: mkpatches.pl,v 1.2 2000/07/01 02:38:56 wiz Exp $
#
# mkpatches: creates a set of patches patch-aa, patch-ab, ...
# in work/.newpatches by looking for *.orig files in and below
@ -87,7 +87,12 @@ while(<handle>) {
if ( -f $complete ) {
$patchfile = ("aa".."zz")[$l];
$patchfile =~ s/^/patch-/;
$diff=`pkgdiff $path $complete`;
if ( "$diff" eq "" ) {
print ("$complete and $path don't differ\n");
} else {
system("pkgdiff $path $complete > $patchdir/$patchfile");
}
} else {
print ("$complete doesn't exist, though $path does");
}

View file

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: pkgdiff,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $
# $NetBSD: pkgdiff,v 1.2 2000/07/01 02:38:56 wiz Exp $
#
# Id: pkgdiff,v 1.4 2000/05/14 01:04:54 feyrer Exp feyrer
#
@ -13,11 +13,14 @@
# All Rights Reserved. Absolutely no warranty.
#
echo '$'NetBSD'$'
echo ''
if [ $# -le 1 ]
then
echo $0: need at least two arguments >&2
exit 1;
fi
lines=3
while [ `diff -u -$lines $@ | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
while [ `diff -u -$lines "$@" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
do
lines=`expr $lines - 1`
if [ $lines = 0 ]; then
@ -26,4 +29,9 @@ do
fi
done
diff -u -$lines $@
if ! diff -qu -$lines "$@" > /dev/null
then
echo '$'NetBSD'$'
echo ''
diff -u -$lines "$@"
fi