Merge branch '176-modulecmd-should-be-relocatable' into 'Pmodules-1.0'

Resolve "modulecmd should be relocatable"

See merge request Pmodules/src!149
This commit is contained in:
2022-12-02 17:24:43 +00:00
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -29,6 +29,7 @@ else
declare -rx TCLLIBPATH="${PMODULES_HOME}/lib/Pmodules"
declare -r modulecmd="${libexecdir}/modulecmd.bin"
fi
declare -rx TCL_LIBRARY="${PMODULES_HOME}/lib/tcl@TCL_VERSION@"
declare verbosity_lvl=${PMODULES_VERBOSITY:-'verbose'}
+1 -1
View File
@@ -2,4 +2,4 @@
unset BASH_ENV
"@BASH@" --noprofile --norc "@MODULECMD@" "$@"
"${PMODULES_HOME}/libexec/bash" --noprofile --norc "${PMODULES_HOME}/libexec/modulecmd.bash" "$@"
+3
View File
@@ -5,6 +5,8 @@ if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
exit 1
fi
declare TCL_VERSION='8.6'
declare -r OS=$(uname -s)
declare BOOTSTRAP_DIR=$(dirname "$0")
@@ -467,6 +469,7 @@ pmodules::install() {
sed_cmd+="s:@BASH@:${PMODULES_HOME}/${UTILBIN_DIR}/bash:g;"
sed_cmd+="s:@MODULECMD@:${PMODULES_HOME}/${UTILBIN_DIR}/modulecmd.bash:g;"
sed_cmd+="s:@MODMANAGE@:${PMODULES_HOME}/${UTILBIN_DIR}/modmanage.bash:g;"
sed_cmd+="s:@TCL_VERSION@:${TCL_VERSION}:g;"
sed "${sed_cmd}" "${SRC_DIR}/profile.bash.in" > "${PMODULES_ROOT}/${CONFIG_DIR}/profile.bash-${PMODULES_VERSION}"
sed "${sed_cmd}" "${SRC_DIR}/profile.csh.in" > "${PMODULES_ROOT}/${CONFIG_DIR}/profile.csh-${PMODULES_VERSION}"