diff options
| author | Roy Marples <roy@marples.name> | 2007-11-19 18:55:32 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-11-19 18:55:32 +0000 | 
| commit | 008d801a505a18fd8dc935e7d535d4f16795da8f (patch) | |
| tree | 0de1e64cc6c8539cf73b7d2a7cdd5d3288398b84 | |
| parent | 6be2c2934b46e23f0ac2c06e8e72692f85076ece (diff) | |
| download | openrc-008d801a505a18fd8dc935e7d535d4f16795da8f.tar.xz | |
Punt the STYLE doc - prospective coders should always match upstream style.
| -rw-r--r-- | STYLE | 53 | 
1 files changed, 0 insertions, 53 deletions
@@ -1,53 +0,0 @@ -This is the rc-scripts style manual.  It governs the coding style  -of rc-scripts.  Everything here might as well have been spoken by  -God.  If you find any issues, please talk to base-system@gentoo.org  -or #gentoo-base on irc.freenode.net. - -############# -# VARIABLES # -############# -- User Variables - -    Variables must always be enclosed by {} -      e.g. ${foo} ${bar} -- Internal Shell Variables - -    Do not use {} with internal variables unless appropriate -      e.g. case $1 in -      e.g. foo=$IFS -      e.g. echo "blah${1}123" -- Assigning with Quotes - -    When assigning to a variable from another variable, you should -    not need quotes. However, you do when assigning from a subshell. -      e.g. foo=${bar} -      e.g. foo="$(uname -a)" - -######### -# TESTS # -######### -- Brackets - -    Always use the [ ... ] form instead of [[ ... ]] as the later only really -    works in bash, and we should support as many shells as we can. -- Quoting - -    When dealing with strings, you should quote both sides. - -############### -# CODE BLOCKS # -############### -- Structure - -    Use the more compact form -      e.g. if ... ; then -      e.g. while ... ; do -    Do not use the older form -      e.g. if ... -           then -- Functions - -    Use the more compact form -      e.g. foo() { -    Do not lead with 'function ' -      e.g. function foo() { - -############ -# COMMENTS # -############ -- General - -    Try to include a comment block before sections  -    of code to explain what you're attempting  | 
