Subject: Re: [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (daf66412138785db43ef5df6f55443d97a432e03)
Date: Tue, 14 Oct 2008 12:52:43 -0400
Jaka Kranjc (smgl AT lynxlynx.info) wrote [08.10.14 07:23]:
> On Tuesday 14 of October 2008 13:13:36 flux wrote:
> > Jaka Kranjc wrote [08.10.14 04:29]:
> > > Unless COMPRESS is unset somewhere too, this check will always be true.
> > > Strings evaluate to true.
> > >
> > > LP
> >
> > It is set (in the getopts loop, if the option is passed), so it won't
> > always evaluate the same (depending on what options the user passes).
> > However, you had it backwards: since COMPRESS is set to 'false' in the
> > commit you saw, then the check will always be false unless KEEP
> > eveluates to non-null (or the user passes the option for compress).
> I'm not talking about $KEEP or the whole test, just about [[ $COMPRESS ]] .
> This will be true regardless what value it has, provided it isn't empty. In
> other words, checking $COMPRESS like that has no effect if it always has
> some
> contents.
Ah! Right you are. Sorry, I misread your comment originally. I had a
type. It should have been if $COMPRESS || [[ -n $KEEP ]]. I had the '[['
in the wrong place. Thanks for catching this!
--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux http://www.sourcemage.org