On 2012-05-11 03:49, Norbert Preining wrote:
>> use 'le-nl' unless you want to run this on initial install ($2=""), too
> 
> le-nl isn't that << ?

'le-nl' is '<=' with a special case for the empty version "" to be later
than anything (for 'le'/'<=' it's earlier than anything, even '~', see
dpkg(1))

> I guess better is
>       if [ -n "$2" ] ; then
>           if dpkg --compare-versions "$2" le "2011.20120509-1" ; then

that's equivalent to le-nl, just two more lines :-)

Andreas



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to