bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error in globash.rc


From: Shigio Yamaguchi
Subject: Re: error in globash.rc
Date: Thu, 07 Feb 2002 10:57:29 +0900

Hello,
> For further future-proofing, this will also fail on 2.08 (same error
> as above) and 3.00 (3 is greater than 2, but 00 is still less than 4).
> Here's a different patch to overcome those problems:

You are right. I'll fix the bug.

About '2.08', it seems that the '0' at the head of '08' means octal
and '8' is illegal as octal number.
So I wrote following code using bash syntax.
"sed 's/[^0-9]//'" removes non digit char and "10#" force bash to assume
the number as decimal. What do you think?

----------------------------------------------------------------------
bash_minorversion=$(echo ${BASH_VERSINFO[1]} | sed 's/[^0-9]//')
if !(( BASH_VERSINFO[0] > 2 || BASH_VERSINFO[0] == 2 && 10#${bash_minorversion} 
>= 4 )); then
        echo "GloBash needs Bash version 2.04 or later."
        exit 1
fi
unset bash_minorversion
----------------------------------------------------------------------

Thank you for your report!
--
Shigio Yamaguchi - Tama Communications Corporation




reply via email to

[Prev in Thread] Current Thread [Next in Thread]