The test you mention is ok under NetBSD /bin/sh, but fails under
bash, which is strict on integer variables  (an empty var is not 0). I
will fix it to work in any case.

This code addresses the case where a -<n> flag and an explicit version
are given (i.e. dim diff -1 dim-0-mv47).
The -<n> flag produces an implicit "old" definition, so we want the
explicit version to be the "new" instead of the "old", despite being
formally the first arg.

 On Fri, 15 Feb 2008 07:58:37 +0100 Philippe Bergheaud
<[EMAIL PROTECTED]> wrote:

> $ dim-0-mv46-pb1 anc
> dim-0-mv47
> 
> $ dim-0-mv46-pb1 diff
> old dim-0-mv47
> new dim+1
> 
> $ dim-0-mv47 anc
> dim-0-mv47
> 
> $ dim-0-mv47 diff
> line 845: [: integer expression expected
> old dim-0-mv46
> new dim-0-mv47
> changed TODO
> changed dim
> changed wdim.php
> 
> The error results from the early parsing of [ "$narg" -ge 1 ] with an 
> empty $narg in the test [ ! "$v2" -a "$narg" -ge 1 ].
> By the way, the expression is not readable and I do not understand the 
> intention.  Parenthesis could be used for clarity.
> --
> Archive: http://www.mail-archive.com/dim@ml.free.fr/
> To unsubscribe: mailto:[EMAIL PROTECTED]
--
Archive: http://www.mail-archive.com/dim@ml.free.fr/
To unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to