Commit e5503c54 authored by gsell's avatar gsell

scripts/Bootstrap/Pmodules/{ennvironment,profile}.bash:

- cleanup
parent 9b1f2622
#!/bin/bash
#
# Notes:
# - PMODULES_ROOT is derived from the location of this file.
# - Some for PMODULES_CONFIG_DIR.
# - The Pmodules software must be installed in
# ${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}
#
declare -x PMODULES_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
if [[ -z ${PMODULES_VERSION} ]]; then
declare -x PMODULES_VERSION="@PMODULES_VERSION@"
fi
declare -x PMODULES_HOME="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
declare -x PMODULES_DIR="${PMODULES_HOME}"
declare -x PMODULES_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
declare -x PMODULES_MODULEFILES_DIR='modulefiles'
declare -x PMODULES_TEMPLATES_DIR='templates'
......@@ -16,12 +14,14 @@ declare -x PMODULES_DEFAULT_GROUPS='Tools Programming'
declare -x PMODULES_DEFINED_RELEASES=':unstable:stable:deprecated:'
declare -x PMODULES_DEFAULT_RELEASES='stable'
# legacy vars
declare -x PSI_PREFIX="${PMODULES_ROOT}"
declare -x PSI_CONFIG_DIR="${PMODULES_CONFIG_DIR}"
declare -x PSI_MODULES_ROOT="${PMODULES_MODULES_ROOT}"
declare -x PSI_TEMPLATES_DIR="${PMODULES_TEMPLATES_DIR}"
declare -x PSI_DEFAULT_FAMILIES="${PMODULES_DEFAULT_GROUPS}"
declare -x PSI_DEFAULT_RELEASES="${PMODULES_DEFAULT_RELEASES}"
declare -x PSI_DEFINED_RELEASES="${PMODULES_DEFINED_RELEASES}"
if [[ -z ${PMODULES_VERSION} ]]; then
declare -x PMODULES_VERSION="@PMODULES_VERSION@"
fi
#
# DO NOT CHANGE THE FOLLOWING LINES!
declare -x PMODULES_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
declare -x PMODULES_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
declare -x PMODULES_HOME="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
declare -x PMODULES_DIR="${PMODULES_HOME}"
#!/bin/bash
#
#############################################################################
# D O N O T C H A N G E T H I S F I L E ! #
#############################################################################
#############################################################################
# read Pmodules configuration
......@@ -27,8 +31,8 @@ if [[ -z ${PMODULES_VERSION} ]]; then
echo "Oops: ${PMODULES_VERSION}: Pmodules version not set." 1>&2
return 1
fi
if [[ -z ${PMODULES_HOME} ]]; then
echo "Oops: ${PMODULES_HOME}: Pmodules home not set." 1>&2
if [[ -z ${PMODULES_HOME} ]]; then
echo "Oops: Pmodules home not set." 1>&2
return 1
fi
if [[ ! -d ${PMODULES_HOME} ]]; then
......
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