From b76482a34ce85afdc7fbabfca59551e3c05eedf8 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 7 Jan 2007 22:47:44 +0000 Subject: [PATCH] Properly sort both the versioned and the scratch builds against each other. --- gdbcompare | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdbcompare b/gdbcompare index 928a788..1cfdcd7 100755 --- a/gdbcompare +++ b/gdbcompare @@ -1,5 +1,5 @@ #! /usr/bin/perl -# $Id$ +# $Id: gdbcompare,v 1.1 2006/12/12 22:56:16 jkratoch Exp $ use strict; @@ -25,7 +25,8 @@ for (values(%arch)) { system("rm -f tests/gdbcompare-*.diff") and die; for my $arch (sort keys(%arch)) { - my @sorted=sort { ($a=~/([-.])[^-.]+[.]\w+$/)[0] cmp ($b=~/([-.])[^-.]+[.]\w+$/)[0];; } @{$arch{$arch}}; + sub trans { return {"."=>0,"-"=>1}->{($_[0]=~/([-.])[^-.]+[.]\w+$/)[0]}.$_[0]; }; + my @sorted=sort { my $a1=trans $a; my $b1=trans $b; $b1 cmp $a1; } @{$arch{$arch}}; do { system $_ and die $_; } for "diff -u tests/'".$sorted[1]."' tests/'".$sorted[0]."' >tests/gdbcompare-'$arch'.diff;true"; }