Commit 78af1806 authored by gsell's avatar gsell
Browse files

scripts/Bootstrap/Pmodules/libpmodules.bash: 'check_modules_env()' splitted...

scripts/Bootstrap/Pmodules/libpmodules.bash: 'check_modules_env()' splitted into 'check_pmodules_env_vars()' and 'check_pmodules_directories()'
parent ee289e15
......@@ -58,7 +58,7 @@ get_options() {
"${bindir}/getopt" "$@"
}
check_pmodules_env() {
check_pmodules_env_vars() {
[[ -n "${PSI_PREFIX}" ]] &&
[[ -n "${PSI_CONFIG_DIR}" ]] &&
[[ -n "${PSI_MODULES_ROOT}" ]] &&
......@@ -67,14 +67,22 @@ check_pmodules_env() {
[[ -n "${PMODULES_VERSION}" ]] || die 1 "
Error: the module environment you are going to use as source has not been
initialized properly!"
}
[[ -d "${PSI_PREFIX}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_CONFIG_DIR}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_MODULES_ROOT}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_TEMPLATES_DIR}" ]] &&
[[ -d "${PMODULES_HOME}" ]] || die 1 "
Error: the module environment '$PSI_PREFIX' has not been initialized properly!"
check_pmodules_directories() {
local -r src_prefix="$1"
[[ -d "${src_prefix}" ]] &&
[[ -d "${src_prefix}/${PSI_CONFIG_DIR}" ]] &&
[[ -d "${src_prefix}/${PSI_MODULES_ROOT}" ]] &&
[[ -d "${src_prefix}/${PSI_TEMPLATES_DIR}" ]] &&
[[ -d "${src_prefix}/Tools/Pmodules/${PMODULES_VERSION}" ]] || die 1 "
Error: the module environment '${src_prefix}' has not been initialized properly!"
}
check_pmodules_env() {
check_pmodules_env_vars
check_pmodules_directories "${PSI_PREFIX}"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment