From 27e5c6a14bc23f32596074dd039e549aa2fc001f Mon Sep 17 00:00:00 2001 From: skrll Date: Sat, 31 Mar 2001 20:19:03 +0000 Subject: Make output of patchdiff more readable. A bit of tidy up while I'm here. Bump to 0.99 (what's next 0.100?) --- pkgtools/pkgdiff/Makefile | 4 ++-- pkgtools/pkgdiff/files/patchdiff.pl | 20 +++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) (limited to 'pkgtools/pkgdiff') diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile index bafe227b4d6..dfdb858e2e5 100644 --- a/pkgtools/pkgdiff/Makefile +++ b/pkgtools/pkgdiff/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2001/03/31 17:24:03 skrll Exp $ +# $NetBSD: Makefile,v 1.12 2001/03/31 20:19:03 skrll Exp $ # -DISTNAME= pkgdiff-0.98 +DISTNAME= pkgdiff-0.99 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkgdiff/files/patchdiff.pl b/pkgtools/pkgdiff/files/patchdiff.pl index f71b6eb4cea..fd0714faf9a 100755 --- a/pkgtools/pkgdiff/files/patchdiff.pl +++ b/pkgtools/pkgdiff/files/patchdiff.pl @@ -1,6 +1,6 @@ #!@PREFIX@/bin/perl # -# $NetBSD: patchdiff.pl,v 1.2 2000/08/17 03:09:26 wiz Exp $ +# $NetBSD: patchdiff.pl,v 1.3 2001/03/31 20:19:04 skrll Exp $ # # patchdiff: compares a set of patches patch-aa, patch-ab, ... in # $WRKDIR/.newpatches in the with another set in patches. @@ -11,17 +11,12 @@ use Getopt::Std; use Cwd; +use File::Spec; my $oldpatchdir, $newpatchdir; -my $wrkdir; +my $wrkdir, $thisdir; my %orig, %new; -# change to WRKDIR - -sub goto_wrkdir { - chdir $wrkdir or die ("can't cd to WRKDIR ($wrkdir)"); -} - sub getfilename { my $fname=shift; local $_; @@ -47,8 +42,7 @@ sub putinhash { while() { chomp; $temp=getfilename($_); - $$hash{$temp}=$_; -# print "put in hash: $temp // $_\n"; + $$hash{$temp}=File::Spec->abs2rel($_, $thisdir); } close(handle); } @@ -67,9 +61,9 @@ EOF %orig=(); %new=(); -$oldpatchdir=cwd(); -chomp($oldpatchdir); -$oldpatchdir=$oldpatchdir."/patches"; +$thisdir=cwd(); +chomp($thisdir); +$oldpatchdir=$thisdir."/patches"; $wrkdir=`make show-var VARNAME=WRKDIR` or die ("can't find WRKDIR -- wrong dir?"); -- cgit v1.2.3