diff --git a/.gitignore b/.gitignore index 36e1a40a0e9ca088e02560042f57c841ea89ef19..f7d2fae6eff1565c5257abe397f6b4e5c9bd7cdb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,12 +13,13 @@ core.* .#* \#* *.local -e3.cfg -tools/ess-env.conf .vscode +cellMods +*.log +__pycache__ + require-ess/require.Makefile require-ess/Db/*.db require-ess/Db/*.d -cellMods -*.log -__pycache__ \ No newline at end of file +e3.cfg +tools/ess-env.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acbb2f8598347e86b1052a2e3f0461df7e6f466..1f6d0692726faf0a21bf911bde5f8b54126a016f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Other changes * removed legacy code from setE3Env.bash +* Removed usage of `env.sh` - now there is a check only for seeing if the environment variable `$IOCNAME` is set ## [3.4.1] diff --git a/require-ess/tools/iocsh.bash b/require-ess/tools/iocsh.bash index 8974764e65b667a52ef1140c710e90f676be53de..d8f38e8d67f562d26acc9e1f52bcd566bb865256 100644 --- a/require-ess/tools/iocsh.bash +++ b/require-ess/tools/iocsh.bash @@ -58,9 +58,6 @@ declare BASECODE="" # To get the absolute path where iocsh.bash is executed IOCSH_TOP=${PWD} -# Load any environment variables, default is $IOCSH_TOP/env.sh -loadEnv "$@" - # Check whether an expected e3 environment variable is defined. # if [[ -z "${EPICS_DRIVER_PATH}" ]]; then diff --git a/require-ess/tools/iocsh_functions.bash b/require-ess/tools/iocsh_functions.bash index 87a5fff82527b677ef272a8b38b1f6ee1e70961c..8b888eaff81d65931343c95231499cd338f4e878 100644 --- a/require-ess/tools/iocsh_functions.bash +++ b/require-ess/tools/iocsh_functions.bash @@ -267,30 +267,11 @@ function check_mandatory_env_settings() { die 1 " $var is not defined!. Please source ${E3_REQUIRE_BIN}/setE3Env.bash " fi done -} - -function loadEnv() { - local envfile=$IOCSH_TOP/env.sh - local warn=false - while [ $# -gt 0 ]; do - arg=$1 - case $arg in - -e) - shift - envfile=$1 - warn=true - ;; - esac - shift - done - - if [ -f "$envfile" ]; then - echo "Loading environment variables from $envfile" - # shellcheck disable=SC1090 - source "$envfile" - elif [ "$warn" = true ]; then - echo "Warning: environment file $envfile does not exist." >&2 + if [[ -z "$IOCNAME" ]]; then + echo "Warning: environment variable IOCNAME is not set." >&2 + else + echo "IOCNAME is set to $IOCNAME" fi } @@ -351,9 +332,6 @@ function loadFiles() { shift __LOADER__="valgrind --leak-check=full " ;; - -e) - shift - ;; -n) __LOADER__="nice --10 " shift @@ -435,7 +413,6 @@ function help() { printf "Options:\n\n" printf " -?, -h, --help Show this page and exit.\n" printf " -v, --version Show version and exit.\n" - printf " -e 'env_file' Load a given environment file 'env_file'.\n" printf " -c 'cmd args' Ioc shell command.\n" printf " -l 'cell path' Run Ioc with a cell path.\n" printf " -s 'prog m=v' Sequencer program (and arguments), run with 'seq'.\n" diff --git a/tools/ess-env.conf b/tools/ess-env.conf index 326f21527fc3b615fb3c86562b84e9a1b7c7cb98..6386b57b2237f1adb9f9d2cd09df2c66a8555723 100644 --- a/tools/ess-env.conf +++ b/tools/ess-env.conf @@ -1 +1 @@ -IOCSH_HASH_VERSION=d3c308e +IOCSH_HASH_VERSION=d7ee603