Skip to content
Snippets Groups Projects
Commit f41b6d4f authored by Wayne Lewis's avatar Wayne Lewis
Browse files

Remove legacy code from setE3Env.bash

* Remove all references to:
** EEE
** conda
** EPICS extensions
* Remove long comment sections
* Minor variable name change for consistency
parent d7ee603d
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Removed duplicated entries from generated `.dep` files
### Other changes
* removed legacy code from setE3Env.bash
## [3.4.1]
......
......@@ -105,7 +105,7 @@ print_env() {
fi
}
# Reset all EPICS, E3, and EEE related PRE-EXIST VARIABLES
# Reset all EPICS and E3 related pre-existing variables
# Remove them from PATH and LD_LIBRARY_PATH
#
# If EPICS_BASE is defined,
......@@ -126,22 +126,6 @@ if [ -n "$EPICS_BASE" ]; then
LD_LIBRARY_PATH=$(drop_from_path "${system_ld_path}" "${drop_ld_path}")
export LD_LIBRARY_PATH
# If EPICS_ENTENSIONS, it is epics_builder
if [ -n "$EPICS_EXTENSIONS" ]; then
ext_path=${PATH}
drop_ext_path="${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}"
PATH=$(drop_from_path "${ext_path}" "${drop_ext_path}")
export PATH
unset EPICS_EXTENSIONS
unset EPICS_PATH
unset EPICS_MODULES
unset EPICS_EXTENSIONS
unset EPICS_AREADETECTOR
unset EPICS_APPS
fi
# If E3_REQUIRE_NAME, it is E3
if [ -n "$E3_REQUIRE_NAME" ]; then
......@@ -150,24 +134,7 @@ if [ -n "$EPICS_BASE" ]; then
PATH=$(drop_from_path "${e3_path}" "${E3_REQUIRE_BIN}")
export PATH
# If CONDA_EXE, it is trouble to find the correct tclsh
if [ -n "$CONDA_EXE" ]; then
# Decouple PATH from ESS Conda Env1 due to tclsh
ess_conda_path1=${PATH}
drop_ess_conda_path1="/opt/conda/envs/python37/bin"
PATH=$(drop_from_path "${ess_conda_path1}" "${drop_ess_conda_path1}")
export PATH
# Decouple PATH from ESS Conda Env2 due to tclsh
ess_conda_path2=${PATH}
drop_ess_conda_path2="/opt/conda/condabin"
PATH=$(drop_from_path "${ess_conda_path2}" "${drop_ess_conda_path2}")
export PATH
fi
# Drop the require-related LD_LIBRARY pathes set previously
# Drop the require-related LD_LIBRARY paths set previously
LD_LIBRARY_PATH=$(drop_from_path "$LD_LIBRARY_PATH" "${E3_REQUIRE_LOCATION}[^:]*")
export LD_LIBRARY_PATH
......@@ -190,34 +157,6 @@ if [ -n "$EPICS_BASE" ]; then
fi
# If EPICS_ENV_PATH, it is EEE
if [ -n "$EPICS_ENV_PATH" ]; then
# Decouple PATH from EPICS_ENV_PATH
eee_path=${PATH}
PATH=$(drop_from_path "${eee_path}" "${EPICS_ENV_PATH}")
export PATH
# Decouple PATH from pvAccessCPP
eee_pvaccess_path=${PATH}
drop_eee_pvaccess_path="${EPICS_MODULES_PATH}/pvAccessCPP/5.0.0/${BASE}/bin/${EPICS_HOST_ARCH}"
PATH=$(drop_from_path "${eee_pvaccess_path}" "${drop_eee_pvaccess_path}")
export PATH
# Decouple PYTHONPATH from pyaPy
eee_python_path=${PYTHONPATH}
drop_eee_python_path="${EPICS_MODULES_PATH}/pvaPy/0.6.0/${BASE}/lib/${EPICS_HOST_ARCH}"
PYTHONPATH=$(drop_from_path "${eee_python_path}" "${drop_eee_python_path}")
export PYTHONPATH
# Unset all unique EEE variables
unset BASE
unset EPICS_BASES_PATH
unset EPICS_DB_INCLUDE_PATH
unset EPICS_MODULES_PATH
unset EPICS_ENV_PATH
fi
unset EPICS_BASE
unset EPICS_HOST_ARCH
......@@ -239,9 +178,9 @@ SRC_NAME=${THIS_SRC##*/}
#
# Dynamic Changes according to the time when one installs REQUIRE
#
# declare -g DEFAULT_EPICS_BASE=/epics/base-3.15.5
# declare -g DEFAULT_EPICS_BASE=/epics/base-7.0.5
# declare -g DEFAULT_REQUIRE_NAME=require
# declare -g DEFAULT_REQUIRE_VERSION=3.0.0
# declare -g DEFAULT_REQUIRE_VERSION=3.4.1
GENERATED_E3_CFG=$SRC_PATH/e3.cfg
......@@ -253,9 +192,9 @@ if [ ! -f "${GENERATED_E3_CFG}" ]; then
E3_REQUIRE_LOCATION=${SRC_PATH%/*}
E3_REQUIRE_VERSION=${E3_REQUIRE_LOCATION##*/}
e3_REQUIRE_PATH=${E3_REQUIRE_LOCATION%/*}
E3_REQUIRE_NAME=${e3_REQUIRE_PATH##*/}
EPICS_BASE=${e3_REQUIRE_PATH%/*}
E3_REQUIRE_PATH=${E3_REQUIRE_LOCATION%/*}
E3_REQUIRE_NAME=${E3_REQUIRE_PATH##*/}
EPICS_BASE=${E3_REQUIRE_PATH%/*}
else
......@@ -320,18 +259,6 @@ E3_PATH="${E3_REQUIRE_BIN}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH}"
PATH=$(set_variable "${old_path}" "${E3_PATH}")
# # We have a problem, if we have the multiple versions of one module, we have the same executable file names.
# # "echo" selects the lower version number by default. And if the version is used with a string,
# # we don't rely upon echo result.
# # Rethink how we handle each binary files within a module
# #
# E3_SITELIBS_BINS=`echo ${E3_SITELIBS_PATH}/*_bin`;
# for each_bins in ${E3_SITELIBS_BINS}; do
# PATH="${PATH}:$each_bins/${EPICS_HOST_ARCH}"
# # echo $each_bins
# done
export PATH
old_ld_path=${LD_LIBRARY_PATH}
......@@ -346,6 +273,7 @@ source "${SRC_PATH}"/iocsh_complete.bash
print_env "$1"
# Set the bash prompt to show information about the e3 environment
BASE_version="${EPICS_BASE##*/base-}"
E3_ENV_INFO="(${BASE_version}-${E3_REQUIRE_VERSION})"
NEW_E3_PS="${E3_ENV_INFO}\[\033[33m\]\u\[\033[m\]@\[\033[33;1m\]\w\[\033[m\]\$ "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment