split into 2 lines for Lmod/bookworm compatibility
changes in /etc/profile.d/lmod.sh
for debian bookworm:
MODULEPATH_INIT="/etc/lmod/modulespath"
if [ -f ${MODULEPATH_INIT} ]; then
for str in $(cat ${MODULEPATH_INIT} | sed 's/#.*$//'); do # Allow end-of-line comments.
for dir in $str; do
if [ -d $dir ]; then
export MODULEPATH=$(/usr/share/lmod/lmod/libexec/addto --append MODULEPATH $dir)
fi
done
done
else
modulespath needs to be splitted into 2 lines to work fine
Edited by Yao CHI