1 |
>>>>> On Sun, 01 Aug 2021, Michał Górny wrote: |
2 |
|
3 |
>> + 3.0) [[ ${EAPI} == 7 ]] \ |
4 |
>> + || die "GTK 2 no longer supported in EAPI ${EAPI}" ;; |
5 |
|
6 |
> Let's make it: |
7 |
|
8 |
> [[ ${EAPI} != 7 ]] && die ... |
9 |
|
10 |
> to keep the logic more straightforward (and consistent with 'if ...; |
11 |
> then'). |
12 |
|
13 |
Generally, I like the "<successful statement> || die" style more, |
14 |
because it is more common. It is also more consistent about the return |
15 |
status of the whole expression. With the && operator above, it would |
16 |
return shell false in case of success. |
17 |
|
18 |
Of course, there's no functional difference here, but if you have it at |
19 |
the end of a function or before an explicit return statement it may play |
20 |
a role. |
21 |
|
22 |
Ulrich |