mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
modulecmd: review code to search modules
This commit is contained in:
@@ -791,18 +791,20 @@ subcommand_load() {
|
||||
#
|
||||
get_load_hints() {
|
||||
local -n output="$1" # [out] ref.var to return result
|
||||
local relstage=''
|
||||
output=''
|
||||
|
||||
local -- search_result="$(set +x; subcommand_search "${m}" -a --no-header 2>&1)"
|
||||
local -- relstage=''
|
||||
while read -r -a line; do
|
||||
(( ${#line[@]} == 0 )) && continue
|
||||
relstage=${line[1]}
|
||||
(( ${#line[@]} == 0 )) && continue
|
||||
relstage="${line[1]}"
|
||||
if [[ ! ":${UsedReleaseStages}:" == *:${relstage}:* ]]; then
|
||||
output+="module use ${relstage}; "
|
||||
fi
|
||||
local group=${line[2]}
|
||||
#echo "group=${group}" 1>&2
|
||||
[[ "${group}" != 'none' ]] || continue
|
||||
if [[ ! ":${UsedGroups}:" == *:${group}:* ]] && \
|
||||
if [[ ! ":${UsedGroups}:" == *:${group}:* ]] && \
|
||||
(( ${GroupDepths[${group}]} == 0 )); then
|
||||
output+="module use ${group}; "
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user