Use of if and test in .qmail files

Bruce Guenter <[email protected]> Tue, 30 Oct 2007 10:40:50 -0600
Newsgroups gmane.mail.ezmlm
Message-ID <[email protected]>
Hi.

While waiting for translations to be completed before releasing (only
Dutch and English are complete now) I decided to push ahead with another
internal change: alter programs and the ezmlmrc template such that all
options that were previously configured by ezmlm-make options can now be
configured with control files other than editor/manager/etc.

In order to accomplish this, all lists must have identical .qmail
control files.  I am most of the way done on this change, but have run
into a couple of situations where I haven't figured out a good way of
inserting conditionals into the program itself.

For example, ezmlm-archive should only execute on lists that are
threaded.  However, when run from the command line, ezmlm-archive should
always add the thread indices.  In both cases, the command-line line
usage is identical, so I don't see any good way of altering the behavior
without introducing backwards compatibility issues.

So my question is: would you forsee any significant portability problems
posed by the use of test or if constructs in the .qmail control files?

Using if would be preferred, as

	if test -e DIR/file; then ezmlm-foo; fi

is more obvious than

	test ! -e DIR/file || ezmlm-foo

but the latter is likely more portable since it will work under either
borne or C shell variants.

Or do I need to introduce another ezmlm-condexec program just for the
purpose of handling these conditionals, ensuring it is portable on any
system that can compile ezmlm-idx?

Your thoughts please?
-- 
Bruce Guenter <[email protected]>                http://untroubled.org/
	I do custom software development.  Email me for details.
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHJ16R6W+y3GmZgOgRAkk1AJ9ZHp4NM4QcofaAHvqr26Ee4jqn0QCdEUcA
cp2r6QBQ43nd1iD/+52PsvA=
=4wMG
-----END PGP SIGNATURE-----