added BASH_SHELL_DEV to list directories to look for modules
parent
9988dd1ed1
commit
0d088cbcab
2
load.sh
2
load.sh
|
@ -25,7 +25,7 @@ unset BASH_SHELL_LOADED
|
||||||
|
|
||||||
module_load shell-process-directory
|
module_load shell-process-directory
|
||||||
for dir in ${1:-$BASH_SHELL_DIRS}; do
|
for dir in ${1:-$BASH_SHELL_DIRS}; do
|
||||||
echo $dir $BASH_SHELL_BASE
|
# echo $dir $BASH_SHELL_BASE
|
||||||
shell_process_directory $dir
|
shell_process_directory $dir
|
||||||
[[ "$dir" = "$BASH_SHELL_BASE" ]] && export BASH_SHELL_BASE_LOADED=true
|
[[ "$dir" = "$BASH_SHELL_BASE" ]] && export BASH_SHELL_BASE_LOADED=true
|
||||||
done
|
done
|
||||||
|
|
|
@ -38,7 +38,8 @@ local MODULE=$1
|
||||||
|
|
||||||
# MODULE_DIRS is array set in the environment and is an array of additional directories to
|
# MODULE_DIRS is array set in the environment and is an array of additional directories to
|
||||||
# search for modules. This makes is easy to include a custom module libraries outside
|
# search for modules. This makes is easy to include a custom module libraries outside
|
||||||
# the shell system. These take precedence over any modules found in shell directories below
|
# the shell system. These take precedence over any modules found in shell directories below.
|
||||||
|
# Precedence is first in list to last.
|
||||||
|
|
||||||
if [[ $MODULE_DIRS ]]; then
|
if [[ $MODULE_DIRS ]]; then
|
||||||
for DIR in "${MODULE_DIRS[@]}"
|
for DIR in "${MODULE_DIRS[@]}"
|
||||||
|
@ -54,6 +55,7 @@ fi
|
||||||
# in revsere order, user or network repos over host over base
|
# in revsere order, user or network repos over host over base
|
||||||
DIRS=( ${BASH_SHELL_DIRS:-$BASH_SHELL_BASE} )
|
DIRS=( ${BASH_SHELL_DIRS:-$BASH_SHELL_BASE} )
|
||||||
[ -d $HOME/$BASH_SHELL_USER ] && DIRS=("${DIRS[@]}" "$HOME/$BASH_SHELL_USER")
|
[ -d $HOME/$BASH_SHELL_USER ] && DIRS=("${DIRS[@]}" "$HOME/$BASH_SHELL_USER")
|
||||||
|
[ -d $BASH_SHELL_DEV ] && DIRS=("${DIRS[@]}" "$BASH_SHELL_DEV")
|
||||||
|
|
||||||
cnt=${#DIRS[@]}
|
cnt=${#DIRS[@]}
|
||||||
for ((i=1;i<=cnt;i++)); do
|
for ((i=1;i<=cnt;i++)); do
|
||||||
|
|
Loading…
Reference in New Issue