Gentoo Archives: gentoo-dev

From: "Harald van Dijk" <truedfx@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [RFC] base.eclass
Date: Sun, 03 Jan 2010 08:03:42
Message-Id: 20100103062307.GA13558@boostbox
In Reply to: Re: [gentoo-dev] Re: [RFC] base.eclass by "Tomáš Chvátal"
1 On Sun, Jan 03, 2010 at 02:56:01AM +0100, Tomáš Chvátal wrote:
2 > Dne 3.1.2010 01:56, Mark Bateman napsal(a):
3 > > There seems to be alot of unquoted variables
4 > >
5 > > 65 base_src_util $@
6 > This is not problem
7
8 Only because you can be sure there will be exactly one word in the
9 result, which will not be split. In general, $@ should be quoted, and it
10 would be a good idea to either do it here too even though it's not
11 strictly necessary, or make the intent clearer and just write
12
13 base_src_util $1
14
15 > > 90 case $1 in
16 > Yarp this is problem and fixed
17
18 That's not a problem. A case expression is another example where quoting
19 is unnecessary; there won't be any word splitting on $1 anyway.
20
21 > > 95 [[ ! -z "${A}" ]] && unpack ${A}
22 > ${A} is not used quoted :]
23
24 Right, that doesn't need quoting, and it would even be okay to drop the
25 unnecessary quotes in [[.

Replies

Subject Author
Re: [gentoo-dev] Re: [RFC] base.eclass Ulrich Mueller <ulm@g.o>