scripts/Bootstrap/Pmodules/modulecmd.in: unset CDPATH added; print message in sub-command 'load' if no module specified
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
#!@PMODULES_HOME@/bin/bash
|
||||
#
|
||||
|
||||
# we have to unset CDPATH, otherwise 'cd' prints the directoy!
|
||||
unset CDPATH
|
||||
|
||||
declare -r PMODULES_DIR=$( cd "$(dirname $0)/.." && pwd )
|
||||
declare -r version='@PMODULES_VERSION@'
|
||||
@@ -464,6 +468,11 @@ subcommand_generic1plus() {
|
||||
"${modulecmd}" "${shell}" "${subcommand}" "$@"
|
||||
}
|
||||
|
||||
#
|
||||
# load module
|
||||
#
|
||||
# $1: module to load
|
||||
#
|
||||
subcommand_load() {
|
||||
output_load_hints() {
|
||||
local -ra rels=( ${available_releases//:/ } )
|
||||
@@ -509,7 +518,9 @@ subcommand_load() {
|
||||
}
|
||||
|
||||
local -r m=$1
|
||||
if module_is_available "${m}"; then
|
||||
if [[ "${m}" == "" ]]; then
|
||||
echo "No module specified." 1>&2
|
||||
elif module_is_available "${m}"; then
|
||||
"${modulecmd}" "${shell}" load "${m}"
|
||||
else
|
||||
if [[ ${userlvl} = 'novice' ]]; then
|
||||
|
||||
Reference in New Issue
Block a user