1 |
>>>>> On Thu, 18 Aug 2011, Micha³ Górny wrote: |
2 |
|
3 |
> On Thu, 18 Aug 2011 20:43:59 +0200 |
4 |
> Fabian Groffen <grobian@g.o> wrote: |
5 |
|
6 |
>> > > elif [[ ${PN} != "leechcraft-core" ]]; then |
7 |
>> > > CAKE_USE_DIR="${S}"/src/plugins/${PN#leechcraft-} |
8 |
>> > |
9 |
>> > Don't quote that. It looks bad that the left-side is unquoted and |
10 |
>> > right side is quoted. |
11 |
>> |
12 |
>> it's a string, what's the problem? |
13 |
|
14 |
> It's just a matter of taste. I think it looks better if both sides |
15 |
> are quoted, or neither is. |
16 |
|
17 |
But both sides of [[ ]] aren't symmetric, in the first place: |
18 |
|
19 |
# When the == and != operators are used, the string to the right of |
20 |
# the operator is considered a pattern and matched according to the |
21 |
# rules described below under Pattern Matching. |
22 |
|
23 |
So there's almost never a reason for quoting the left-hand side, while |
24 |
on the right-hand side quotes will suppress pattern matching. |
25 |
|
26 |
(Of course, in the example above it doesn't matter, because the string |
27 |
doesn't contain any special characters.) |
28 |
|
29 |
Ulrich |