1 |
> On 31 Mar 2021, at 10:09, Ulrich Mueller <ulm@g.o> wrote: |
2 |
> |
3 |
>>>>>> On Wed, 31 Mar 2021, Andreas Sturmlechner wrote: |
4 |
> |
5 |
>> setup-allowed-flags() { |
6 |
>> + [[ ${EAPI} == [0-7] ]] || |
7 |
>> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." |
8 |
>> + _setup-allowed-flags |
9 |
>> +} |
10 |
> |
11 |
> Strictly speaking, EAPIs are strings, so numeric comparison is not |
12 |
> meaningful. Suggestion: "... is not available in EAPI ${EAPI}." |
13 |
|
14 |
That’s a reason to not do arithmetic comparison in e.g. Bash, but >= refers |
15 |
to age/chronological order here, which isn’t a problem. |
16 |
|
17 |
> |
18 |
>> test-flag-PROG() { |
19 |
>> + [[ ${EAPI} == [0-7] ]] || |
20 |
>> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." |
21 |
>> + _test-flag-PROG |
22 |
>> +} |
23 |
> |
24 |
>> test-flags-PROG() { |
25 |
>> + [[ ${EAPI} == [0-7] ]] || |
26 |
>> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." |
27 |
>> + _test-flags-PROG |
28 |
>> +} |
29 |
> |
30 |
> Same for these. |
31 |
> |
32 |
> Ulrich |