=================== ENV BASH FUNCTIONS =================== Bash function reminders ------------------------ type name list a function definition set list all functions unset -f name remove a function typeset -F lists just the names local from inside a function lists the locals, eg:: ff(){ local a="hello" ; local b="world" ; local ; } ff * http://www.network-theory.co.uk/docs/bashref/ShellFunctions.html * http://www-128.ibm.com/developerworks/library/l-bash-test.html bad workaround blockade of cms02 from belle7 ---------------------------------------------- On G:: svn up ~/env ; svn export --force ~/env ~/eenv cd ; rsync -av eenv N: ## deletes do not get propagated with this On N:: export ENV_HOME=/home/blyth/eenv ; ## modify in .bash_profile to use the exported better workaround via reverse proxy on H ------------------------------------------ #. requies nginx to be running on H #. one time `svn switch --relocate` is needed to keep working with the env WC on N:: [blyth@belle7 e]$ svn switch --relocate http://dayabay.phys.ntu.edu.tw/repos/env http://hfag.phys.ntu.edu.tw:90/repos/env #. ditto for heprez:: [blyth@belle7 heprez]$ svn switch --relocate http://dayabay.phys.ntu.edu.tw/repos/heprez http://hfag.phys.ntu.edu.tw:90/repos/heprez env functions --------------- *env-dbg* invoke with bash rather than . when debugging to see line numbers of errors, CAUTION error reporting can be a line off *env-rsync top-level-fold [target-node]* propagate a top-level-folder without svn, caution can leave SVN wc state awry ... usually easiest to delete working copy and "svn up" when want to come clean and go back to SVN *env-rsync-all [target-node]* rsync env working copy excluding .svn etc.. to a list of remote nodes specified by ssh node tag *env-again* delete working copy and checkout again *env-u* update the working copy, aliased to "eu" *env-rst name.bash* create rst wrapper to include the usage bash function *env-toc* create index.rst toctree referencing all .rst in PWD absorbing an exported env working copy ----------------------------------------- Useful following server downtime:: [blyth@cms02 ~]$ diff -r --brief env env.keep | grep -v .svn | grep differ | perl -p -e 's,Files (\S*) and (\S*) differ,cp $2 $1, ' - toctree hookup --------------- When referring to implicit indices such as "python/python.bash" or "tools/tools.bash" use the form "python/index". The bash2rst tool does the appropriate path swapping to generated a cleaner output tree without repeated levels. .. warning:: this could be confusing when using manual index.rst together with auto generated *_docs* ====== FUNCS ====== .. toctree:: python/index tools/index