summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2010-12-17 23:08:25 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2010-12-17 23:08:25 +0000
commit30444ef1a687a00dc415da7822a7cadb8e6c13b0 (patch)
tree45fb63e69e8f297dd969d50b94eafbe524298678
parenta8d38c565f757bfce2c6ebc7142a5964cd8934d1 (diff)
layout fixes
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@468 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xsort-deb8
1 files 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)} <>);