From fc20878cc9c0c0ab9768e7c4c8f4f56b97620fc4 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 21 Oct 2022 14:15:32 +0200 Subject: [PATCH] modulecmd: init of manpath is now a sub-function of pmodules_init() --- Pmodules/modulecmd.bash.in | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index f34e29f..16bbdae 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1817,25 +1817,6 @@ init_modulepath() { done } -init_manpath() { - std::replace_path MANPATH "${PMODULES_HOME%/*}/.*" - - if [[ -r /etc/man.config ]]; then - declare _manconf='/etc/man.config' - elif [[ -r /etc/man.conf ]]; then - declare _manconf='/etc/man.conf' - fi - if [[ -n ${_manconf} ]]; then - while read name value rest; do - std::append_path MANPATH "${value}" - done < <(grep "^MANPATH\s" "${_manconf}") - unset _manconf - else - std::append_path MANPATH "${PMODULES_HOME}/share/man" - std::append_path MANPATH "/usr/share/man" - fi -} - pmodules_init() { init_used_groups() { declare -gx UsedGroups='' @@ -1857,6 +1838,25 @@ pmodules_init() { OverlayInfo['base:used']='yes' } + init_manpath() { + std::replace_path MANPATH "${PMODULES_HOME%/*}/.*" + + if [[ -r /etc/man.config ]]; then + declare _manconf='/etc/man.config' + elif [[ -r /etc/man.conf ]]; then + declare _manconf='/etc/man.conf' + fi + if [[ -n ${_manconf} ]]; then + while read name value rest; do + std::append_path MANPATH "${value}" + done < <(grep "^MANPATH\s" "${_manconf}") + unset _manconf + else + std::append_path MANPATH "${PMODULES_HOME}/share/man" + std::append_path MANPATH "/usr/share/man" + fi + } + pm::read_config declare -gx LOADEDMODULES=''