From 30444ef1a687a00dc415da7822a7cadb8e6c13b0 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 17 Dec 2010 23:08:25 +0000 Subject: layout fixes git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@468 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- sort-deb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sort-deb b/sort-deb index fc760f1..184bf0a 100755 --- a/sort-deb +++ b/sort-deb @@ -26,8 +26,12 @@ # change the argument to system calls to a list. -- Peter Palfrader -sub dpkgcmp{my ($i,$j)=@_;chomp $i;chomp $j; +sub dpkgcmp{ + my ($i,$j)=@_; + chomp $i; + chomp $j; return system('dpkg', '--compare-versions', $i, 'lt', $j) * 1 + system('dpkg', '--compare-versions', $i, 'gt', $j) *-1; - ;} +}; + print (sort {dpkgcmp($a,$b)} <>); -- cgit v1.2.3