Michael E. Maher wrote:

> The mail from Matias really says it all, it's the extra `(POSIX regular
> expressions)' which is screwing up the integer comparison `if test "..."
> -ge 429; then'.
>
> This seems like a bug in either:
>     less -V giving too much information for xz
>     - or -
>     xzless assuming that less -V is a certain way
>
> For a quick (untested) hack, you could remove the check or change the
> statement to:
>
> if test "$(less -V | { read ver && echo ${ver#less }; } | awk '{print
> $1}')" -ge 429; then

System 1

$ less -V
less 444
...

System 2

$ less -V
less 451 (POSIX regular expressions)

The error is in xz assuming that the version format doesn't change.

It should be something like:

if ( test "$(less -V | head -n1 | cut -d' ' -f2)" -ge 429; then
...

That's shorter, more robust, and has more clarity.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to