# # 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 informative LOGON files, primarily the logs # from batch processing et al. the default is a sub-directory of $LOGONROOT. # if [ -z "${LOGONLOG}" ]; then export LOGONLOG=${LOGONROOT}/log; fi # # and another target directory for temporary files, e.g. various intermediate # files created by [incr tsdb()] (including potentially large event files for # MaxEnt experimentation), and the results of Redwoods exports. # if [ -z "${LOGONTMP}" ]; then export LOGONTMP=/tmp; fi if [ -z "${PVM_TMP}" ]; then export PVM_TMP=${LOGONTMP}; 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 [ -z "${LOGONOS}" ]; then if [ "$OSTYPE" = "linux" -o "$OSTYPE" = "linux-gnu" ]; then # # apparently, (some) Debian installations come with an older uname(1), # where `-i' is not available :-{. (11-mar-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) LOGONOS="linux.x86.32" ;; x86_64) LOGONOS="linux.x86.64" ;; *) echo "LOGONOS: unknown Linux variant (check \`uname -m'); exit." exit 1; esac elif [ "$OSTYPE" = "solaris" -o "${OSTYPE%%?.?}" = "solaris" ]; then LOGONOS="solaris"; elif [ "$OSTYPE" = "cygwin" ]; then LOGONOS="windows"; fi fi export LOGONOS # # even on systems that have no Motif installed, make sure the LKB can find its # Motif libraries (this is somewhat of a hack, really). # if [ "$OSTYPE" = "linux" -o "$OSTYPE" = "linux-gnu" ]; then if [ -z "${LD_LIBRARY_PATH}" ]; then LD_LIBRARY_PATH=${LOGONROOT}/lingo/lkb/lib/${LOGONOS} else LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/lingo/lkb/lib/${LOGONOS} fi export LD_LIBRARY_PATH # # on 64-bit machines, also include 32-bit libraries, so we can run things in # compatibility mode. # if [ "${LOGONOS}" = "linux.x86.64" ]; then LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LOGONROOT}/lingo/lkb/lib/linux.x86.32 fi 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}/.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 file is (re-)created automatically from " > ${rc}; echo -e "\`\$LOGONROOT/dot.chasenrc'\n;;;\n" >> ${rc}; sed "s@_LOGONROOT_@${LOGONROOT}@" ${LOGONROOT}/dot.chasenrc >> ${rc}; # # record the base address of the SVN repository used, to make it easier for # scripts to generalize across various access methods, e.g. `svn.emmtee.net' # vs. `logon.emmtee.net' vs. SSL-encrypted access. # if [ -z "${LOGONSVN}" ]; then { export LOGONSVN=$(svn info $LOGONROOT | egrep '^URL: ' | sed 's/^URL: //'); LOGONSVN=$(echo ${LOGONSVN} | sed 's@^\(http://[^/]*\).*$@\1@'); } > /dev/null 2>&1 fi # # 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 SVN comments. # export EDITOR=emacs; # # support for DeepBank 1.0, either in the LOGON tree, or a separate path # if [ -z "${DEEPBANK}" ]; then if [ -d ${LOGONROOT}/coli/deepbank ]; then DEEPBANK=${LOGONROOT}/coli/deepbank; else if [ -d /norstore/project/ltr/DELPH-IN/DeepBank ]; then DEEPBANK=/norstore/project/ltr/DELPH-IN/DeepBank; fi fi fi # # make some of the `gold' profiles visible in the default [incr tsdb()] home # { mkdir ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold; if [ -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg ]; then if { /bin/ls -l ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg \ | egrep "tsdb/gold$"; } > /dev/null 2>&1; then : else /bin/rm ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg > /dev/null 2>&1; ln -s ${LOGONROOT}/lingo/erg/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg; fi else ln -s ${LOGONROOT}/lingo/erg/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/erg; fi if [ -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/terg ]; then : else ln -s ${LOGONROOT}/lingo/terg/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/terg; fi if [ -z "${DEEPBANK}" \ -o -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/deepbank ]; then : else ln -s ${DEEPBANK}/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/deepbank; fi if [ -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/jacy ]; then : else ln -s ${LOGONROOT}/dfki/jacy/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/jacy; fi if [ -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/gg ]; then : else ln -s ${LOGONROOT}/dfki/gg/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/gg; fi if [ -h ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/srg ]; then : else ln -s ${LOGONROOT}/upf/srg/tsdb/gold \ ${LOGONROOT}/lingo/lkb/src/tsdb/home/gold/srg; fi } > /dev/null 2>&1 # # turn on the new Linguistic User Interface (LUI) in the LKB # if [ -z "$LUI" ]; then export LUI=yzlui; fi # # a convenience function for dan and oe, to simplify interactive testing # function erg () { if [ -z "${1}" ]; then n=1; else n=${1}; fi cheap -t -sm -yy -default-les=all -cm=${n} -verbose=3 \ $LOGONROOT/lingo/erg/english < /tmp/${USER}.yy \ 2>&1 | tee /tmp/$USER.log } # erg()