geek rescue kit Code
Brought to you by:
ctaf
| File | Date | Author | Commit |
|---|---|---|---|
| bin | 2006-04-22 | ctaf | [r92] |
| etc | 2006-04-24 | ctaf | [r95] |
| AUTHORS | 2006-04-09 | ctaf | [r55] |
| ChangeLog | 2006-04-24 | ctaf | [r94] |
| README | 2006-04-24 | ctaf | [r95] |
| README.DEVEL | 2006-04-24 | ctaf | [r95] |
| TODO | 2006-04-24 | ctaf | [r95] |
| VERSION | 2006-04-24 | ctaf | [r95] |
| ctafconf-configuration | 2005-10-08 | u38928862 | [r1] |
| ctafconf-install | 2005-10-08 | u38928862 | [r1] |
| ctafconf-uninstall | 2005-10-08 | u38928862 | [r1] |
===========================================================
===========================================================
########################GUIDELINE##########################
===========================================================
===========================================================
===========================================================
FILES AND FOLDERS:
===========================================================
- 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
.ctafconf root directory
.ctafconf/etc contain all configuration files
.ctafconf/bin ct-profile, ct-installconf, ctssh, ctrepo, ...
.ctafconf/perso user specific configuration files
.ctafconf/perso/bin user binary
.ctafconf/perso/semantic semantic cache file (for emacs, when cedet is installed)
.ctafconf/perso/previous all file replaced by the ctafconf
.ctafconf/perso/wallpaper user wallpaper (ct-add-wallpaper to add one)
===========================================================
SHELL POSIX:
===========================================================
######################
Global advise:
- always quote string and variable to avoid problem with string containing space
- use shell lib
- $(( 1 + 2 )) dont work on sun (jsh)
######################
--shell lib
ssft.sh : interface for zenity, kdialog, dialog or read
shelltools.sh : portable function between bash,ksh,tcsh, and zsh
set_env, set_var, null_which (which without output), ...
xsession.sh : delay application launching
grktools.sh : file operation tools, copyfile, linkfile, restorefile
make file operation with backup, usefull for installation
######################
--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
===========================================================
CUSTOM VAR:
===========================================================
ctafconf (user-profile):
- wm
- wallpaper
- config
- interface
- sudo (ct-sudo)
defaultapp (for menus):
- webnavigator
- mailclient
shell (shell-profile):
- zshprompt
- email
- name
- proxy
- pager
- editor
- screen at startup
fluxbox:
- style (init file)
e16:
- style
emacs (emacs-profile):
- size
- ilisp
- cedet
- ecb
- doxy
- ...
ct-ssh/ct-repo:
ssh_gate