#!/bin/bash
# This script should be sourced at log on (e.g. in .bashrc)

# Determine absolute path of this script
pushd `dirname $0` >/dev/null
SCRIPTPATH=`pwd`
popd >/dev/null

# Set environment variables if not yet set
if [ -z "$DIM_DNS_NODE" ]; then export DIM_DNS_NODE=ihp-pc1.ethz.ch; fi
if [ -z "$DIM_HOST_NODE" ]; then export DIM_HOST_NODE=`hostname`.ethz.ch; fi
if [ -z "$DIMDIR" ]; then export DIMDIR=/usr/local/dim/; fi
if [ -z "$QWTDIR" ]; then export QWTDIR=/usr/local/qwt/; fi
if [ -z "$QTDIR" ]; then export QTDIR=/usr/local/Trolltech/Qt-4.6.2; fi

#Set paths
export LD_LIBRARY_PATH=$QWTDIR/lib:$DIMDIR/linux:$LD_LIBRARY_PATH
export PATH=$DIMDIR/linux:$SCRIPTPATH:$SCRIPTPATH/../Edd:$PATH
export PATH=.:$SCRIPTPATH/../../FADctrl:$QTDIR/bin:$PATH
