mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-30 11:19:39 +02:00
Resolve "modbuild: cleanup source and build directory before and after building"
This commit is contained in:
@@ -1570,7 +1570,7 @@ _build_module() {
|
||||
}
|
||||
|
||||
cleanup_build() {
|
||||
[[ ${enable_cleanup_build} == yes ]] || return 0
|
||||
[[ ${enable_cleanup_build} != 'yes' ]] && return 0
|
||||
[[ "${BUILD_DIR}" == "${SRC_DIR}" ]] && return 0
|
||||
{
|
||||
cd "/${BUILD_DIR}/.." || std::die 42 "Internal error"
|
||||
@@ -1590,7 +1590,7 @@ _build_module() {
|
||||
}
|
||||
|
||||
cleanup_src() {
|
||||
[[ ${enable_cleanup_src} == yes ]] || return 0
|
||||
[[ ${enable_cleanup_src} != 'yes' ]] && return 0
|
||||
{
|
||||
cd "/${SRC_DIR}/.." || std::die 42 "Internal error"
|
||||
[[ $(pwd) == / ]] && \
|
||||
@@ -1799,6 +1799,8 @@ _build_module() {
|
||||
"%s " \
|
||||
"${module_name}/${module_version}:" \
|
||||
"start building ..."
|
||||
cleanup_build
|
||||
cleanup_src
|
||||
compile_and_install
|
||||
post_install
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user