Live manual

Live Systems

<< previous toc next >>

Live Systems Manual

Coding Style

15. Coding Style

This chapter documents the coding style used in live systems.

15.1 Compatibility

15.2 Indenting

15.3 Wrapping

Bad:

if foo; then
         bar
fi

Good:

if foo
then
         bar
fi

Bad:

Foo () {
         bar
}

Good:

Foo ()
{
         bar
}

15.4 Variables

Bad:

FOO=bar

Good:

FOO="bar"

Bad:

if [ -f "${FOO}"/foo/"${BAR}"/bar ]
then
         foobar
fi

Good:

if [ -f "${FOO}/foo/${BAR}/bar" ]
then
         foobar
fi

15.5 Miscellaneous


<< previous toc next >>