#-----------------------------------------------------------
# Copyright Christian Arnault LAL-Orsay CNRS
# arnault@lal.in2p3.fr
# See the complete license in cmt_license.txt "http://www.cecill.info". 
#-----------------------------------------------------------

CMTBIN=`uname`-`uname -m | sed -e 's# ##g'`; export CMTBIN

if test "${CMTCONFIG}" = "" ; then
  CMTCONFIG=`${CMTROOT}/mgr/cmt_system.sh`; export CMTCONFIG
fi


eval function b {} 1>/dev/null 2>&1
if test "$?" = "0"; then
. ${CMTROOT}/src/setup.zsh
fi

newpath=""
for p in `echo ${PATH} | sed 's/:/ /g'`; do
  if test ! "`echo ${p} | egrep CMT`" ; then
    if test "${newpath}" = "" ; then
      newpath=${p}
    else
      newpath=${newpath}:${p}
    fi
  fi
done

PATH=${newpath}:${CMTROOT}/${CMTBIN}; export PATH
alias cmt='${CMTROOT}/${CMTBIN}/cmt.exe'; export cmt

newpath=""
for p in `echo ${CLASSPATH} | sed 's/:/ /g'`; do
  if test ! "`echo ${p} | egrep CMT`" ; then
    if test "${newpath}" = "" ; then
      newpath=${p}
    else
      newpath=${newpath}:${p}
    fi
  fi
done

CLASSPATH=${newpath}:${CMTROOT}/java/cmt.jar; export CLASSPATH

alias jcmt='(java cmt_parser)'; export jcmt
