Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFC: sh versionator.eclass
Date: Sun, 07 Oct 2007 05:21:30
Message-Id: 200710070109.18838.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: RFC: sh versionator.eclass by George Shapovalov
1 On Tuesday 02 October 2007, George Shapovalov wrote:
2 > Tuesday, 2. October 2007, Roy Marples Ви написали:
3 > > And here it is
4 >
5 > - if [[ "${FORTRANC}" = "gfortran" ]]; then
6 > + if [ "${FORTRANC}" = "gfortran" ]; then
7 >
8 > You know, it is funny to see these lines after all those cries about how [
9 > is evil and we should really never ever use it but rather always use [[
10 > form :).
11 >
12 > Oh, btw, does the compliant sh correctly process the most cited
13 > composition? : [ -n $foo ] && [ -z $foo ] && echo "huh?"
14 > (straight from devmanual, the primary reason why [ is considered bad)
15
16 [...] will crap a brick if foo expands to multiple arguments which is why
17 [[...]] is preferred ... it'll do the sane thing and work correctly
18 regardless
19 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: RFC: sh versionator.eclass Roy Marples <uberlord@g.o>