1 |
On 06/22/2016 08:34 PM, Dan Douglas wrote: |
2 |
> On 06/22/2016 07:12 PM, Ulrich Mueller wrote: |
3 |
>>>>>>> On Wed, 22 Jun 2016, Dan Douglas wrote: |
4 |
>> |
5 |
>>> + [[ |
6 |
>>> + ( BASH_VERSINFO[0] -ge 4 || EAPI -ge 6 ) && |
7 |
>>> + $(declare -p "EGIT_${livevars[idx+1]}" 2>/dev/null) == 'declare -A'* |
8 |
>>> + ]] && ref=EGIT_${livevars[idx+1]}[\$PN] |
9 |
>> |
10 |
>> EAPI is not a number but a string, so don't use arithmetic comparison |
11 |
>> to test for it |
12 |
> |
13 |
> You mean in the future it may have non-digit values that pass the |
14 |
> `case $EAPI in ...)` at the top? |
15 |
|
16 |
Yeah, it would be perfectly legal to name the next EAPI "seven" and add |
17 |
it to the case statement at the top. Then [[ "seven" -ge 6 ]] is false. |