mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-28 10:29:37 +02:00
modulecmd: init of manpath is now a sub-function of pmodules_init()
This commit is contained in:
+19
-19
@@ -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=''
|
||||
|
||||
Reference in New Issue
Block a user