#
# This script is to be 'sourced' into the shell of the
# build environment, to initialize the AFS based Oracle
# environment at CERN.
#
# Please use it as
#   export PROC_INIT=scripts/proc-init-cern-afs
#   make -f Makefile.etics build
#

if [ -d '/afs/cern.ch/project/oracle' ]; then
    source /afs/cern.ch/project/oracle/script/setoraenv.sh -s 10205
fi

# proc-cache for experimental or remote builds, where AFS is not
# available. The actual build will fail, if there are no cached
# C sources for the Pro*C source.
if [ -x "$top_srcdir/scripts/proc" ]; then
    export PATH=$top_srcdir/scripts:$PATH
    if [ -z "$ORACLE_HOME" ]; then
        export ORACLE_HOME=${PROC_CACHE_DIR:-$HOME/.proc_cache_dir}
    fi
fi

