sm-sorcery AT lists.ibiblio.org
Subject: Discussion of Sorcery related topics
List archive
Re: [SM-Sorcery] Preferred coding style for if tests
- From: Hamish Greig <hgreig AT bigpond.net.au>
- To: sm-sorcery AT lists.ibiblio.org
- Subject: Re: [SM-Sorcery] Preferred coding style for if tests
- Date: Thu, 29 Jan 2004 03:43:53 +1100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
the second one will actually cause problems with sorcery if used in some
circumstances. It breaks DEPENDS, look at the HISTORY files for my recent cvs
spell merges, I tried to simplify DEPENDS by using that syntax and it caused
sorcery to stop processing depends when it came across it. Also if used in
BUILD files after prepare_install it will cause problems as it is run
regardless of return/exit codes from previous lines or even the make command,
It should be avoided where ever possible, even though it is neat and easy.
Hamish
On Thu, 29 Jan 2004 03:22, Ondra Tomecka wrote:
> Hi,
>
> Just a quick question, which may unleash a flamewar ;-)
> Is there preferred style for writing tests?
>
> I mean should I use for patches this form:
> -------------------------------------------
> if [ some_test ]; then
> do_some_simple_command
> fi
> -------------------------------------------
>
> or just
>
> [ some_test ] && do_some_simple_command
>
> What are the opinions?
>
> I used to write with C and C++, so I'm used to former version, but
> recently (blah, 2 years already) I'm working mostly with scripts where the
> latter form is possible.
>
> Andy
>
> _______________________________________________
> SM-Sorcery mailing list
> SM-Sorcery AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-sorcery
- --
IRC nick: drmoriarty
SMGL co-conspirator
# Do You SMGL!?
# http://www.sourcemage.org/
# Linux so advanced it may as well be magic!
ANTI-SPAM WARNING: I delete any html message from my server without reading
Please use text only
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAF+bV8fSufZR6424RAg8pAKCPYL0MCZDHE81ck3Gw1ekBPHcp/ACgi7b7
09Phm19scYELsoa/zJYsIRA=
=YxUl
-----END PGP SIGNATURE-----
-
[SM-Sorcery] Preferred coding style for if tests,
Ondra Tomecka, 01/28/2004
-
Re: [SM-Sorcery] Preferred coding style for if tests,
Eric Schabell, 01/28/2004
- Re: [SM-Sorcery] Preferred coding style for if tests, Ondra Tomecka, 01/28/2004
- Re: [SM-Sorcery] Preferred coding style for if tests, Hamish Greig, 01/28/2004
- Re: [SM-Sorcery] Preferred coding style for if tests, Paul, 01/28/2004
-
Re: [SM-Sorcery] Preferred coding style for if tests,
Eric Schabell, 01/28/2004
Archive powered by MHonArc 2.6.24.