Hi people,

Just a note on how to do if / then / else blocks properly in bash... The
following style *won't* work, so don't do anything daft like committing
it to eutils.eclass without testing and h0rking half the tree, okay?

if foo ; then
    # do nothing
else
    echo "hi"
fi

You have to have a real genuine statement inside each block. Otherwise,
bash will cry.

If The Doc existed, which it doesn't, and it wasn't in super-early-draft
state, which it would be if it did exist, you'd be able to see this at
[1]. As it is, you'll just have to read the bash docs.

[1]:
http://dev.gentoo.org/~ciaranm/docs/IGNORE_the-doc/#multiple-selection

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, shell tools)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm

Attachment: pgpMdaIYElaZt.pgp
Description: PGP signature

Reply via email to