From 81956f6221b8b82072ddadbce51285cabe6d9680 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 17 Dec 2010 23:08:27 +0000 Subject: 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 --- sort-deb | 4 ++-- 1 file 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; }; -- cgit v1.2.3