diff options
author | Peter Palfrader <peter@palfrader.org> | 2010-12-17 23:08:27 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2010-12-17 23:08:27 +0000 |
commit | 81956f6221b8b82072ddadbce51285cabe6d9680 (patch) | |
tree | b86ee8ecd20e5dc344143dfd3c565ff6931819b6 /sort-deb | |
parent | 30444ef1a687a00dc415da7822a7cadb8e6c13b0 (diff) |
Strip all whitespace, even ws in front of the version number
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@469 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'sort-deb')
-rwxr-xr-x | sort-deb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; }; |