Gentoo Archives: gentoo-dev

From: Peter Stuge <peter@×××××.se>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass: opam.eclass
Date: Tue, 25 Jul 2017 12:48:43
Message-Id: 20170725124833.GX12397@stuge.se
In Reply to: Re: [gentoo-dev] New eclass: opam.eclass by Alexis Ballier
1 Good work on the refactoring!
2
3 Alexis Ballier wrote:
4 > > > if [ -d "${ED}/usr/share/doc/${PF}/${PN}" ] ; then
5 > >
6 > > It’s always been recommended to me that we should use the [[ … ]]
7 > > form.
8 >
9 > Doesn't make much difference here
10
11 Some; you need neither quote nor {} in expansions within [[ ]]. So
12 instead of the above one could write:
13
14 if [[ -d $ED/usr/share/doc/$PF/$PN ]]; then
15
16
17 > and I've always been recommending the other way :p
18 ..
19 > if you only do ebuilds or bash, then you don't care, but I definitely
20 > do other scripts
21
22 Be that as it may this is an eclass, and I think conforming to an
23 established coding style has significant value. I too have understood
24 that to be [[ ]].
25
26
27 Thanks
28
29 //Peter

Replies

Subject Author
Re: [gentoo-dev] New eclass: opam.eclass "Michał Górny" <mgorny@g.o>