# # make sure this file is included from your personal `~/.bashrc', e.g. put the # following towards the end of `~/.bashrc' (and uncomment these, of course): # # LOGONROOT=~/logon # if [ -f ${LOGONROOT}/dot.bashrc ]; then # . ${LOGONROOT}/dot.bashrc # fi # # if you decide to keep your LOGON source tree in a different location, say # `~/src/logon', instead, then adjust the above accordingly. it should not be # necessary to make changes to _this_ file, however. # # ----------------------------------------------------------------------------- # file: .bashrc # module: LOGON initialization file for BaSH # version: 0.0 -- 21-nov-03 # written by: oe, uio # last update: # updated by: # ----------------------------------------------------------------------------- # # ----------------------------------------------------------------------------- # # make global variable for LOGON directory tree accessible to other processes. # export LOGONROOT # # establish a target directory for `temporary' LOGON files, primarily the logs # from batch processing et al. default to user home directory for backwards # compatibility, but allow users like helge to keep their growing collection of # these files in a separate directory ... # if [ -z "${LOGONTMP}" ]; then export LOGONTMP=${HOME} fi # # prepend LOGON binary directory to the global search path # PATH=${LOGONROOT}/bin:$PATH # # first, work out the current operating system, one of `linux' (x86), `solaris' # (sparc), or `windows' (x86); anything else will require manual installation. # if [ "$OSTYPE" = "linux" -o "$OSTYPE" = "linux-gnu" ]; then # # apparently, (some) Debian installations come with an older uname(1), where # `-i' is not available :-{. (30-apr-05; oe) # if uname -i > /dev/null 2>&1; then cpu=$(uname -i) if [ "${cpu}" = "unknown" ]; then cpu=$(uname -m); fi else cpu=$(uname -m) fi case "${cpu}" in i?86) os="linux.x86.32" ;; x86_64) os="linux.x86.64" ;; unknown) os="linux.x86.32" ;; *) echo "dot.bashrc: unknown Linux variant (check \`uname -i')." os="linux.x86.32"; esac elif [ "$OSTYPE" = "darwin" -o "${OSTYPE%%?.?}" = "darwin" ]; then os="macos.ppc.32"; elif [ "$OSTYPE" = "solaris" -o "${OSTYPE%%?.?}" = "solaris" ]; then os="solaris"; elif [ "$OSTYPE" = "cygwin" ]; then os="windows"; fi # # giving a few more people (at sites with XLE licenses) access to the LOGON CVS # repository, we feel a little protective of parts of the tree. # some people even delete it. if [ -d ${LOGONROOT}/parc ]; then chmod 700 ${LOGONROOT}/parc > /dev/null 2>&1 fi # # even on systems that have no Motif installed, make sure the LKB can find its # Motif libraries (this is somewhat of a hack, really). also, add the path for # XLE Sicstus libraries (used by the XLE), so dynamic loading will work. # if [ -z "${LD_LIBRARY_PATH}" ]; then LD_LIBRARY_PATH=${LOGONROOT}/lingo/lkb/lib/${os} else LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/lingo/lkb/lib/${os} fi LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/parc/xle/lib/${os} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/uio/lib/${os} export LD_LIBRARY_PATH # # on 64-bit machines, also include 32-bit libraries, so we can run things in # compatibility mode. # if [ "$os" = "linux.x86.64" ]; then LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/lingo/lkb/lib/linux.x86.32 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/parc/xle/lib/linux.x86.32 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/uio/lib/linux.x86.32 fi # # make sure there is a directory `~/tmp' for the LKB to store temporary data; # also, make sure to install a couple of dummy `dot' files, unless they exist # already. # /bin/mkdir ${HOME}/tmp > /dev/null 2>&1 if [ ! -f ${HOME}/.cvsrc ]; then /bin/cp ${LOGONROOT}/dot.cvsrc ${HOME}/.cvsrc; fi if [ ! -f ${HOME}/.pvm_hosts ]; then /bin/cp ${LOGONROOT}/dot.pvm_hosts ${HOME}/.pvm_hosts; fi if [ -f ${HOME}/.clinit.cl -o -f ${HOME}/.tsdbrc ]; then . ${LOGONROOT}/etc/sanitize fi if [ ! -f ${HOME}/.podiumrc ]; then /bin/cp ${LOGONROOT}/dot.podiumrc ${HOME}/.podiumrc; fi # # for ChaSen, we need to expand $LOGONROOT a we create a user-specific file # rc="$LOGONROOT/.chasenrc"; /bin/rm -f ${rc}; echo -en ";;;\n;;; this files is (re-)created automatically from " > ${rc}; echo -e "\`\$LOGONROOT/dot.chasenrc'\n;;;\n" >> ${rc}; sed "s@_LOGONROOT_@$LOGONROOT@" $LOGONROOT/dot.chasenrc >> ${rc}; # # even though most LOGON users go through :pserver:, set this propertly too. # export CVS_RSH=ssh # # as we start experimenting with larger cpu grids, this will be required too # export PVM_RSH=/usr/bin/ssh # # request emacs(1) as the standard editor, e.g. for CVS comments. # export EDITOR=emacs # # by default, use standard cvs(1) binary; developers who manipulate more than # a single CVS repository (e.g. paul and oe) may set this to `lvs' instead. # if [ -z "${CVS}" ]; then export CVS=cvs fi # # make some of the `gold' profiles visible in the default [incr tsdb()] home # { mkdir ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold; if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/norgram ]; then : else ln -s ${LOGONROOT}/parc/pargram/norwegian/bokmal/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/norgram; fi if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg ]; then : else ln -s ${LOGONROOT}/lingo/erg/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg; fi if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/logon ]; then : else ln -s ${LOGONROOT}/gold ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/logon; fi if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/gg ]; then : else ln -s ${LOGONROOT}/dfki/gg/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/gg; fi # # i goofed in an earlier version, creating a cyclic soft link :-{ # if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/evolution/evolution ]; then /bin/rm -f ${LOGONROOT}/lingo/lkb/src/tsdb/home/evolution/evolution fi if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/evolution ]; then /bin/rm -f ${LOGONROOT}/lingo/lkb/src/tsdb/home/evolution fi ln -s ${LOGONROOT}/uio/evolution ${LOGONROOT}/lingo/lkb/src/tsdb/home; if [ -a ${LOGONROOT}/lingo/lkb/src/tsdb/home/redwoods ]; then : else ln -s ${LOGONROOT}/lingo/redwoods/tsdb/home \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/redwoods; fi } > /dev/null 2>&1 # # when renaming `uio/bin/linux/' --> `uio/bin/linux.x86.32/', i took a nasty # short-cut in CVS, which results in confusing message upon each `cvs update'; # patch this up at the shell level. (17-jun-05; oe) # if [ -d ${LOGONROOT}/uio/bin/linux ]; then /bin/rm -rf ${LOGONROOT}/uio/bin/linux; fi # # turn on the new Linguistic User Interface (LUI) in the LKB # export LUI=t # # rumor has it the new morphology code requires a pointer to the PARGGRAM root # export PARGRAM=${LOGONROOT}/parc/pargram