sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356)
- From: flux <flux AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356)
- Date: Tue, 20 Jul 2010 10:16:41 +0900
Eric Sandall (eric AT sandall.us) wrote [10.07.20 06:51]:
> Quoting Ladislav Hagara <ladislav.hagara AT unob.cz>:
>
> >
> >> SPELL=mangler
> >>+if [[ "$MANGLER_SCM" == "y" ]] && [[ ! -z $MANGLER_SCM ]]; then
> >
> >Isn't the second condition (-z) useless? :-)
> >If MANGLER_SCM==y it have to be non zero lenght.
>
> Without the -z, when I did `gaze version mangler` before casting I got
> '-' as the grimoire version. Adding the -z gave me "1.2.0" as the
> installed version as was proper.
>
> There should have been no difference, you are correct.
>
> -sandalle
The '! -z' could also be rendered as '-n', just so you know. Both do the
same, so '! -z' is not logically incorrect or anything.
However, you should be quoting the variable in the '-z' test. I'm not
saying this has anything to do with the issue you were having, but it's
recommended that all variables tested for null status always be quoted.
It's just good habit. :)
Did you try running the script with -x to see what was really being
tested and what the result was? Maybe there's a bug somewhere?
--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org
Attachment:
pgpCeItLIPHNf.pgp
Description: PGP signature
-
[SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356),
Eric Sandall, 07/19/2010
-
Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356),
Ladislav Hagara, 07/19/2010
-
Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356),
Eric Sandall, 07/19/2010
- Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356), flux, 07/19/2010
-
Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356),
Eric Sandall, 07/19/2010
-
Re: [SM-Commit] GIT changes to master grimoire by Eric Sandall (5e0ccd0c378b5be13d38d847493bdbadf35b7356),
Ladislav Hagara, 07/19/2010
Archive powered by MHonArc 2.6.24.