Warning, file /drich-dev/environ.sh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 if [ -z "${BASH_SOURCE[0]}" ]; then
0005 export DRICH_DEV=$(dirname $(realpath $0))
0006 else
0007 export DRICH_DEV=$(dirname $(realpath ${BASH_SOURCE[0]}))
0008 fi
0009
0010
0011
0012 export BUILD_NPROC=$([ $(uname) = 'Darwin' ] && sysctl -n hw.ncpu || nproc)
0013 if [ "$BUILD_NPROC" = "" ]; then export BUILD_NPROC=1; fi
0014 echo "detected $BUILD_NPROC cpus"
0015
0016
0017 export EIC_SHELL_PREFIX=$DRICH_DEV/prefix
0018
0019
0020 export LOCAL_DATA_PATH=$DRICH_DEV
0021
0022
0023 source /opt/detector/setup.sh
0024
0025
0026
0027
0028 [ -f $EIC_SHELL_PREFIX/setup.sh ] && source $EIC_SHELL_PREFIX/setup.sh
0029
0030
0031 if [ -f $EIC_SHELL_PREFIX/bin/eicrecon-this.sh ]; then
0032 if [ -z "$CI" ]; then
0033 echo "PATCH: exclude container's EICrecon plugins from JANA_PLUGIN_PATH"
0034 exc="/opt/local/lib/EICrecon/plugins"
0035 export JANA_PLUGIN_PATH=$(echo $JANA_PLUGIN_PATH | sed "s;${exc}:;;g" | sed "s;:${exc};;g" | sed "s;${exc};;g" )
0036 echo "ENVIRONMENT: source EICrecon"
0037 source $EIC_SHELL_PREFIX/bin/eicrecon-this.sh
0038 echo "PATCH: source thisroot.sh removes /opt/local/bin from PATH; add it back"
0039 export PATH="$PATH:/opt/local/bin"
0040 else
0041 echo "On CI runner; only setting JANA_PLUGIN_PATH"
0042 export JANA_PLUGIN_PATH=$EIC_SHELL_PREFIX/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
0043 fi
0044 fi
0045
0046
0047 export IRT_ROOT_DICT_FOUND=0
0048 if [ -f $EIC_SHELL_PREFIX/lib/libIRT_rdict.pcm -a -f $EIC_SHELL_PREFIX/lib/libIRT.rootmap ]; then
0049 export IRT_ROOT_DICT_FOUND=1
0050 elif [ -f /opt/local/lib/libIRT_rdict.pcm -a -f /opt/local/lib/libIRT.rootmap ]; then
0051 export IRT_ROOT_DICT_FOUND=1
0052 fi
0053
0054
0055
0056 export JUGGLER_INSTALL_PREFIX=$EIC_SHELL_PREFIX
0057 export JUGGLER_N_THREADS=$BUILD_NPROC
0058
0059 export PS1="${PS1:-}"
0060 export PS1="drich${PS1_SIGIL}>${PS1#*>}"
0061 unset branch
0062
0063
0064 export LD_LIBRARY_PATH=$DRICH_DEV/lib:$EIC_SHELL_PREFIX/lib:$LD_LIBRARY_PATH
0065 export PYTHONPATH=$EIC_SHELL_PREFIX/python:$PYTHONPATH
0066 export PATH=$EIC_SHELL_PREFIX/bin:$PATH
0067
0068
0069 export RBENV_ROOT=$DRICH_DEV/.rbenv
0070 if [ -d "$RBENV_ROOT" ]; then
0071 export PATH=$RBENV_ROOT/bin:$PATH
0072 eval "$(.rbenv/bin/rbenv init - bash)"
0073 export PYTHON=$(which python)
0074 fi
0075
0076
0077
0078 export PATH=.:$PATH
0079 export PATH=$DRICH_DEV/bin:$PATH
0080 [ -d "${HOME}/bin" ] && export PATH=$PATH:${HOME}/bin
0081
0082 shopt -s autocd
0083 alias ll='ls -lhp --color=auto'
0084
0085 broot() {
0086 if [ $
0087 echo "USAGE: $0 [ROOT file]"
0088 else
0089 root -l --web=off $1 -e 'new TBrowser'
0090 fi
0091 }
0092
0093
0094 echo """
0095
0096
0097 ###########################################
0098 ### dRICH Development Environment ###
0099 ###########################################
0100
0101 Detector:
0102 DETECTOR = $DETECTOR
0103 DETECTOR_PATH = $DETECTOR_PATH
0104 DETECTOR_CONFIG = $DETECTOR_CONFIG
0105 DETECTOR_VERSION = $DETECTOR_VERSION
0106
0107 LD_LIBRARY_PATH:
0108 $(echo $LD_LIBRARY_PATH | sed 's/:/\n /g')
0109
0110 Common:
0111 DRICH_DEV = $DRICH_DEV
0112 BUILD_NPROC = $BUILD_NPROC
0113 EIC_SHELL_PREFIX = $EIC_SHELL_PREFIX
0114 JANA_PLUGIN_PATH = $JANA_PLUGIN_PATH
0115 IRT_ROOT_DICT_FOUND = $IRT_ROOT_DICT_FOUND
0116
0117 """