summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsort-deb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sort-deb b/sort-deb
index 184bf0a..54d1013 100755
--- a/sort-deb
+++ b/sort-deb
@@ -28,8 +28,8 @@
sub dpkgcmp{
my ($i,$j)=@_;
- chomp $i;
- chomp $j;
+ ($i) = $i =~ /(\S+)/;
+ ($j) = $j =~ /(\S+)/;
return system('dpkg', '--compare-versions', $i, 'lt', $j) * 1
+ system('dpkg', '--compare-versions', $i, 'gt', $j) *-1;
};