Bug #605 -- Conditional execution
Kevin P. Fleming
kpfleming at linuxfromscratch.org
Sun Feb 1 21:04:10 PST 2004
James Robertson wrote:
> The v3.1 DTD does not even have <if>, <then>, <else> in it anywhere.
> hence the reason I removed them from the syntax doc. Kinda difficult to
> document something that does not exist. So, I think the info in the doc
> was out of place and those elements do not exist anywhere yet. I am
> thinking you are going to need them in v3.2 and up.
You're right, I had forgotten that I removed that stuff from the 3.1
DTD. I found what I needed in a snapshot of the syntax doc though.
> I like this scenario. Looks clean and easy to follow. What would all
> of the condition ATTLIST's be? Same as what bash offers now?
I don't plan on <test> parsing its argument at all, except to check for:
- numeric string (zero means false, non-zero means yes)
- true/yes, or caseful variations thereof
- false/no, or caseful variations thereof
Anything else provided to <test> would be passed to the test program (or
shell builtin, depending on your shell) and the result used as the
result of the <test> element.
If we do decide to move any test verbs into nALFS, they would become new
elements; for example, if we wanted to optimize -f (file existence),
then we would add a <file-exists> condition element.
More information about the alfs-discuss