Gentoo Archives: gentoo-dev

From: Aron Griffis <agriffis@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] portage prize winners
Date: Thu, 03 Jun 2004 03:35:04
Message-Id: 20040603032734.GA18102@time.flatmonk.org
In Reply to: [gentoo-dev] portage prize winners by Aron Griffis
1 Here's another good one, this time from ibm-jdk-bin:
2
3 if [ !`use X` ] ; then
4
5 Btw, every one of these that I have posted is truly broken, i.e. it
6 will probably do the opposite of what the author intended, if bash can
7 manage to execute it at all.
8
9 In this example, the condition will always be true, because both ! and
10 !X are non-empty strings. The correct version would be
11
12 if [ ! "`use X`" ] ; then
13
14 but the REALLY CORRECT version is
15
16 if ! use X; then
17
18 Regards,
19 Aron
20
21 --
22 Aron Griffis
23 Gentoo Linux Developer

Replies

Subject Author
Re: [gentoo-dev] portage prize winners Donnie Berkholz <spyderous@g.o>