mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
modbuild: sym-link issue fixed
$ROOT/$GROUP/modulefiles/$NAME can be a directory but also a sym-link. The installation of the modulefile failed in case of a sym-link. This is fixed now.
This commit is contained in:
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user