cookutils rev 25
README: add small coding style
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 06 03:29:03 2011 +0200 (2011-05-06) |
parents | bf6325d1ecf4 |
children | 93bb4bfc8c26 |
files | README cooker |
line diff
1.1 --- a/README Fri May 06 00:50:00 2011 +0200 1.2 +++ b/README Fri May 06 03:29:03 2011 +0200 1.3 @@ -23,7 +23,8 @@ 1.4 * Compile and generate the package 1.5 * Remove installed build deps 1.6 * Provide a log for each cook 1.7 - * Clean a package in the wok 1.8 + * Clean one or all packages in the wok 1.9 + * Check for receipt and package quality 1.10 1.11 Cook does not: 1.12 1.13 @@ -40,7 +41,7 @@ 1.14 * $stuff : Path to package stuff: wok/pkg/stuff 1.15 * $fs : Path to package file system: wok/pkg/taz/*/fs 1.16 * $install : Path to all installed files by the package 1.17 - Old style is _pkg and cook is compatible 1.18 + Old style is $_pkg and cook is compatible 1.19 1.20 Cook also manage packages list so they can be used for a personnal packages 1.21 repository or sent to the official mirror. We create and use: 1.22 @@ -62,9 +63,33 @@ 1.23 Web interface : /var/www/cgi-bin/cooker 1.24 Cache folder : /home/slitaz/cache 1.25 1.26 -The web interface consist in one CGI script, 2 xHTML files and a CSS style. 1.27 -Cook log can are produced by cook and the cooker just act as a fronted to 1.28 -check them in a nice way. 1.29 +The web interface consist in one CGI script and one CSS style. Cook log can 1.30 +are produced by cook and the cooker just act as a fronted to check them in 1.31 +a nice way. Web interface also hightligh success and error, can show receipt 1.32 +and the cooker logs such as the last ordered list or commits check. 1.33 + 1.34 + 1.35 +Coding style 1.36 +------------ 1.37 + 1.38 + * Use tab and not space to ident 1.39 + * Use name rater than $1 $2 $2 1.40 + * Variables from config file are $UPERCASE 1.41 + * Variables initialized by cook are $lowercase 1.42 + * Function can be a single word or use_underline() 1.43 + my_function() { 1.44 + echo "Hello World" 1.45 + } 1.46 + * Use $(command) and not: `command` 1.47 + * Cook use gettext for messages, not the cooker 1.48 + * If you add a feature, add also the doc to explain it 1.49 + * Use clean case with space before case end ;; 1.50 + case "$pkg" in 1.51 + a) echo "Hello World" ;; 1.52 + *) continue ;; 1.53 + esac 1.54 + * Make commands and options as short as possible 1.55 + * Think to log everything to help debug 1.56 1.57 1.58 ================================================================================
2.1 --- a/cooker Fri May 06 00:50:00 2011 +0200 2.2 +++ b/cooker Fri May 06 03:29:03 2011 +0200 2.3 @@ -209,7 +209,7 @@ 2.4 echo -e "\nSetting up the Cooker" 2.5 echo "Cooker --setup using: $SLITAZ" | log 2.6 separator 2.7 - for pkg in mercurial rsync slitaz-toolchain 2.8 + for pkg in mercurial rsync slitaz-toolchain gettext 2.9 do 2.10 [ ! -d "$INSTALLED/$pkg" ] && tazpkg get-install $pkg 2.11 done