Merge branch '190-modbuild-installation-of-modulefile-fails-in-case-of-sym-links-pointing-to-non-existing' into 'Pmodules-1.0'

Resolve "modbuild: installation of modulefile fails in case of sym-links pointing to non-existing directories"

See merge request Pmodules/src!164
This commit is contained in:
2023-02-09 08:58:54 +00:00
+4
View File
@@ -763,6 +763,9 @@ pbuild::make_all() {
"${PMODULES_ROOT}/${GROUP}/${PMODULES_MODULEFILES_DIR}" \
"${names[@]}" \
"${module_name}")
if [[ -L "${modulefile_dir}" ]]; then
modulefile_dir=$(readlink -m "${modulefile_dir}")
fi
modulefile_name="${modulefile_dir}/${module_version}"
PREFIX="${PMODULES_ROOT}/${GROUP}/${module_name}/${module_version}"
local -i i=0
@@ -954,6 +957,7 @@ pbuild::make_all() {
"%s " \
"${module_name}/${module_version}:" \
"installing modulefile '${modulefile_name}' ..."
mkdir -p "${modulefile_dir}"
install -m 0444 "${src}" "${modulefile_name}"
}