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

Merge branch 'E3-340-env-vars' into 'master'

E3-340: Add e3 environment consistency check

See merge request e3/e3-require!39
parents 074d571c 0f3205ab
No related branches found
No related tags found
1 merge request!39E3-340: Add e3 environment consistency check
Pipeline #84968 passed
......@@ -11,10 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Rudimentary testing has been added:
* * Tests that the correct version is loaded
* * Tests that elementary patching/building works as expected
* Added consistency check between e3 environment variables and path to `iocsh.bash`. `iocsh.bash` will abort if these are not consistent.
### Bugfixes
* `iocsh.bash --help` (and variants) no longer loads tries to load `env.sh`.
### Other changes
## [3.4.1]
### Bugfixes
......
......@@ -61,7 +61,7 @@ IOCSH_TOP=${PWD}
# Load any environment variables, default is $IOCSH_TOP/env.sh
loadEnv "$@"
# The most unique environment variable for e3 is EPICS_DRIVER_PATH
# Check whether an expected e3 environment variable is defined.
#
if [[ -z "${EPICS_DRIVER_PATH}" ]]; then
set -a
......@@ -70,6 +70,18 @@ if [[ -z "${EPICS_DRIVER_PATH}" ]]; then
set +a
fi
# Check that the e3 environment definition and the path for this script
# are consistent
if [ "${E3_REQUIRE_BIN}" != "${SC_TOP}" ]; then
echo "Error: Configured e3 environment does not match path for iocsh.bash executable."
echo "Please source the appropriate setE3Env.bash file for the version"
echo "of iocsh.bash you wish to use, or run iocsh.bash from a clean"
echo "environment so it can set the environment correctly."
echo "Expected path to iocsh.bash from environment = ${E3_REQUIRE_BIN}"
echo "Actual path to iocsh.bash = ${SC_TOP}"
die 2
fi
BASECODE="$(basecode_generator)"
check_mandatory_env_settings
......
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