geek rescue kit Code
Brought to you by:
ctaf
| File | Date | Author | Commit |
|---|---|---|---|
| bin | 2006-04-19 | ctaf | [r85] |
| etc | 2006-04-20 | ctaf | [r86] |
| AUTHORS | 2006-04-09 | ctaf | [r55] |
| ChangeLog | 2006-04-19 | ctaf | [r85] |
| README | 2006-04-12 | ctaf | [r66] pre 0.3.0 |
| README.DEVEL | 2006-04-19 | ctaf | [r85] |
| TODO | 2006-04-19 | ctaf | [r85] |
| VERSION | 2006-04-12 | ctaf | [r66] pre 0.3.0 |
| ctafconf-configuration | 2005-10-08 | u38928862 | [r1] |
| ctafconf-install | 2005-10-08 | u38928862 | [r1] |
| ctafconf-uninstall | 2005-10-08 | u38928862 | [r1] |
GUIDELINE
===========================================================
FILES:
all files in .ctafconf/etc must be static (user should not edit them, program should not add file into)
all binary files should be in .ctafconf/bin
all files in .ctafconf/perso must not be overwritten and are user specific
===========================================================
SHELL POSIX:
always quote string and variable to avoid problem with string containing space
!!bash output which error on stderr
--sh---- (ksh, zsh, bash)
#syntax
if cmp -s $SRCFILE $FILE; then
fi
export al=val
alias al=val
var=val
source
#catch a signal
_trap_kill ()
{
exit 0
}
trap _trap_kill INT #KILL EXIT QUIT INT TERM
#exit from sourced or standalone script
#sourced or standalone
return 2>/dev/null
exit
--tcsh--
#syntax
if ( -x file ) echo cool
setenv al val
alias al val
set var val
===========================================================
MINE:
all .mine should be in etc/mine
they should contains configuration user can tweak
===========================================================
PACKAGE:
all .grk should be in etc/
they contains installation instruction for a package
current variable/functions to define are (replace pkgname with the name of the file):
pkgname_name='name of the package' (usefull??)
#description of the package
pkgname_description
#is this package installed?
#0 = installed
#1 = not installed
pkgname_is_installed
#install this package is pkgname_is_installed return "not installed"
#0 = installed
#1 = not installed
pkgname_install
#uninstall file installed with pkgname_install
pkgname_uninstall
#this function is always called when you call ct-installconf
#dont affected by pkgname_uninstall
#put all .mine there, and stuff for upgrade
pkgname_alwaysinstall