Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] obs eclasses
Date: Tue, 13 Sep 2011 12:27:49
In Reply to: Re: [gentoo-dev] [RFC] obs eclasses by "Amadeusz Żołnowski"
On 09/13/2011 07:24, Amadeusz Żołnowski wrote:

> Hi, > > > Excerpts from Michal Hrusecky's message of 2011-09-13 13:11:28 +0200: >> Comments and improvements are welcome. > > Just some minor remarks: > > >> [[ -z ${OPENSUSE_RELEASE} ]] || OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}" >> [[ -n ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!" >> [[ -n ${OBS_PACKAGE} ]] || die "OBS_PACKAGE not set!" > > You don't need -n/-z with [[. > > [[ $var ]] == [[ -n $var ]] > [[ ! $var ]] == [[ -z $var ]] >
What about other comparisons, like -f, -e, or -d? Bash's manpage only says [[ expression ]] -- it doesn't seem to go into the level of detail (at least not in the section that I quickly perused) about what flag operators are necessary or not. Also, is this a bash4-only thing, or bash3 and/or bash2 as well? If yes to above, we should get this edited and fixed up, then, because it uses -z/-n inside [[ ]]: Oh, forgot, it won't break initscripts, will it? -- Joshua Kinard Gentoo/MIPS kumba@g.o 4096R/D25D95E3 2011-03-28 "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between." --Emperor Turhan, Centauri Republic


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


Subject Author
Re: [gentoo-dev] [RFC] obs eclasses "Amadeusz Żołnowski" <aidecoe@g.o>
[gentoo-dev] Re: [RFC] obs eclasses Steven J Long <slong@××××××××××××××××××.uk>