diff options
author | Peter Palfrader <peter@palfrader.org> | 2010-12-17 23:08:25 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2010-12-17 23:08:25 +0000 |
commit | 30444ef1a687a00dc415da7822a7cadb8e6c13b0 (patch) | |
tree | 45fb63e69e8f297dd969d50b94eafbe524298678 | |
parent | a8d38c565f757bfce2c6ebc7142a5964cd8934d1 (diff) |
layout fixes
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@468 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | sort-deb | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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)} <>); |