#!/bin/bash # # determine the LOGON root directory, assuming this script resides in a # `bin' sub-directory that is shared across platforms. # if [ -z "${LOGONROOT}" ]; then path=$(dirname $0) if [ "${path#./}" != "${path}" ]; then path="$(pwd)/${path#./}" fi if [ "${path#/}" = "${path}" ]; then if [ "${path}" = "." ]; then path="$(pwd)"; else path="$(pwd)/${path}" fi fi LOGONROOT="${path%/bin}"; export LOGONROOT; fi # # include a shared set of shell functions and global parameters, including the # architecture identifier .LOGONOS. # . ${LOGONROOT}/etc/library.bash; LOGONOS=linux.x86.32; # # set up dynamic linker search path, so as to find our shared libraries # if [ "${LOGONOS%%.*}" == "linux" ]; then if [ -z "${LD_LIBRARY_PATH}" ]; then LD_LIBRARY_PATH=${LOGONROOT}/uio/lib/${LOGONOS}; else LD_LIBRARY_PATH=${LOGONROOT}/uio/lib/${LOGONOS}:${LD_LIBRARY_PATH}; fi export LD_LIBRARY_PATH; fi if [ "${1}" == "-t" -o "${1}" == "--test" ]; then shift 1; exec ${LOGONROOT}/uio/bin/${LOGONOS}/tcheap "$@" elif [ "${1}" == "-n" -o "${1}" == "--new" ]; then shift 1; exec ${LOGONROOT}/uio/bin/${LOGONOS}/ncheap "$@" elif [ "${1}" == "-o" -o "${1}" == "--oe" ]; then shift 1; exec ${LOGONROOT}/uio/bin/${LOGONOS}/ocheap "$@" elif [ "${1}" == "-c" -o "${1}" == "--conll" ]; then shift 1; exec ${LOGONROOT}/uio/bin/${LOGONOS}/ccheap "$@" elif [ "${1}" == "-d" -o "${1}" == "--dfki" ]; then shift 1; if [ -z "${LD_LIBRARY_PATH}" ]; then LD_LIBRARY_PATH=${LOGONROOT}/dfki/lib/${LOGONOS}; else LD_LIBRARY_PATH=${LOGONROOT}/dfki/lib/${LOGONOS}:${LD_LIBRARY_PATH}; fi exec ${LOGONROOT}/dfki/bin/${LOGONOS}/cheap "$@" else exec ${LOGONROOT}/uio/bin/${LOGONOS}/cheap "$@" fi