mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-23 08:17:56 +02:00
build-system: error in cleanup
Cleanup before building fails if ${BUILD_DIR}/../.. doesn't exist.
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@
|
||||
(issues #235, #243)
|
||||
* Files in `$PMODULES_TMPDIR/<module>` are now removed before
|
||||
and after building a module (except cleanup has been disbaled).
|
||||
(issue #242)
|
||||
(issues #242, #245)
|
||||
* Set prefix and directory/name of modulefile based on group not on
|
||||
environment variables like `{COMPILER,MPI,HDF5}_VERSION` (issue #244)
|
||||
|
||||
|
||||
@@ -1551,6 +1551,7 @@ _build_module() {
|
||||
cleanup_build() {
|
||||
[[ ${enable_cleanup_build} != 'yes' ]] && return 0
|
||||
[[ "${BUILD_DIR}" == "${SRC_DIR}" ]] && return 0
|
||||
[[ -d "${BUILD_DIR}/../.." ]] || return 0
|
||||
{
|
||||
cd "/${BUILD_DIR}/.." || std::die 42 "Internal error"
|
||||
[[ "$(${pwd})" == "/" ]] && \
|
||||
@@ -1570,6 +1571,7 @@ _build_module() {
|
||||
|
||||
cleanup_src() {
|
||||
[[ ${enable_cleanup_src} != 'yes' ]] && return 0
|
||||
[[ -d "${BUILD_DIR}/../.." ]] || return 0
|
||||
{
|
||||
cd "/${SRC_DIR}/.." || std::die 42 "Internal error"
|
||||
[[ $(pwd) == / ]] && \
|
||||
|
||||
Reference in New Issue
Block a user