scriptname=cris-axis-setup.sh
#set -x -v # uncomment for debugging
if [ $(basename $0) == $scriptname ]
then 
  echo script \`${scriptname}\' has to be sourced, i.e. called with a leading \`. $scriptname\'
  exit -1
fi
oldpwd=$OLDPWD
base=$(pwd)
# # if [ $# -lt 1 ]
# # then
# #    epicsDir=$PWD
# # else 
# #    epicsDir=$1
# #    if [ ! -d $epicsDir ] 
# #    then
# #       echo EPICS directory \'$epicsDir\' invalid
# #       return -1
# #    fi
# # fi
cd /misc/zumbruch/playground/ETRAX/SDK && cd $(ls --color=never -t -1 -d devbo* | head -n 1) && . ./init_env
cd $base
cd /misc/zumbruch/playground/ETRAX/compiler && . ./setup.sh 
# # cd $base
# # cd $epicsDir && . ./myepicslogin.sh
cd $base
cd /misc/zumbruch/playground/ETRAX/debugger && . ./setup.sh
cd $oldpwd          
cd $base
unset scriptname base oldpwd epicsDir
