#==============================================================
#
#  Abs:  A common setup for basic environment   
#
#  Name: commonSetup_facet.bash
#
#  Facility:  SLAC/FACET
#
#  Auth: 09-Oct-2008, Jingchen Zhou       (jingchen)
#  Rev:  dd-mmm-yyyy, Reviewer's Name     (USERNAME)
#
#--------------------------------------------------------------
#  Mod:
# 
#  24-May-2018,  K. Luchini 
#    Replace FACET_ROOT with FACILITY_ROOT
#  02-Nov-2010, Jingchen Zhou
#    cloned from LCLS commonSetup.bash
#  09-Apr-2012, JIngchen Zhou
#    modified to support python
#
#==============================================================
#
# Clear most environment variables
#
export LD_LIBRARY_PATH=""
#
#set up CVS
#
if [ -d /afs/slac/g/lcls/cvs ]; then
	export CVSROOT=/afs/slac/g/lcls/cvs
else
	USER=`whoami`
#	export CVSROOT=:ext:${USER}@lcls-prod02:/afs/slac/g/lcls/cvs
fi
export CVS_RSH=ssh
if [ -z "$CVSIGNORE" ]; then
  export CVSIGNORE="O.* *~ *.class *.BAK core*"
fi
if [ -z "$CVSEDITOR" ]; then
  export CVSEDITOR=emacs
fi



#
# set up common applications and packages  
#
# set up OCTAVE
#
if [ -f ${FACILITY_ROOT}/tools/octave/setup/octave.bash ]; then
	. ${FACILITY_ROOT}/tools/octave/setup/octave.bash
fi
#
# set up PYTHON
#
if [ -f ${FACILITY_ROOT}/tools/python/setupPython_facet.bash ]; then
	. ${FACILITY_ROOT}/tools/python/setupPython_facet.bash
fi
#
# set up Lua
#
if [ -f ${FACILITY_ROOT}/tools/lua/setupLua.bash ]; then
	. ${FACILITY_ROOT}/tools/lua/setupLua.bash
fi
#
# set up ORACEL
#
if [ -f ${FACILITY_ROOT}/tools/oracle/oracleSetup-facet.bash ]; then
	. ${FACILITY_ROOT}/tools/oracle/oracleSetup-facet.bash
fi
#
# Greg's aida setup, connect to aidaprod. Moved here so AIDA setup won't 
# overwrite global Java environment 
#
if [ -a /usr/local/lcls/physics/package/aida/common/script/aidaSetEnvPROD.bash ]; then
  . /usr/local/lcls/physics/package/aida/common/script/aidaSetEnvPROD.bash
fi
#
# set up common PATH
#
if [ -z `echo $PATH | grep /usr/local/bin` ]; then
  export PATH=$PATH:/usr/local/bin
fi
#
#set up common alias
#
alias rm='rm -i'
alias purge='/bin/rm '*~''
alias cvs='cvs -d `echo $CVSROOT`'
alias kinit='/usr/local/bin/kinit'

