]> https://gitweb.dealii.org/ - candi.git/commitdiff
Add instant clean up option 182/head
authorFabian Castelli <fabian.castelli@kit.edu>
Wed, 26 May 2021 16:47:52 +0000 (18:47 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Wed, 26 May 2021 16:47:52 +0000 (18:47 +0200)
candi.cfg
candi.sh

index 449b080e8509aef2cf5bc754bb3f72896eb9dcc3..dc520d2001de5e6d3dbf08360b6e669015fe7292 100644 (file)
--- a/candi.cfg
+++ b/candi.cfg
@@ -116,3 +116,13 @@ MKL=OFF
 #       this mode!
 DEVELOPER_MODE=OFF
 
+################################################################################
+
+# OPTION {ON|OFF}: Remove build directory after successful installation
+INSTANT_CLEAN_BUILD_AFTER_INSTALL=OFF
+
+# OPTION {ON|OFF}: Remove downloaded packed src after successful installation
+INSTANT_CLEAN_SRC_AFTER_INSTALL=OFF
+
+# OPTION {ON|OFF}: Remove unpack directory after successful installation
+INSTANT_CLEAN_UNPACK_AFTER_INSTALL=OFF
index d00864625388edcfaa981e0eb2410c835f17dd21..817db3912c437c792de45561bfea94facdd9bd52 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -1130,6 +1130,23 @@ for PACKAGE in ${PACKAGES[@]}; do
             package_unpack
         fi
         package_build
+
+        # Clean build directory after install
+        if [ ${INSTANT_CLEAN_BUILD_AFTER_INSTALL} = ON ]; then
+            rm -rf ${BUILDDIR}
+        fi
+
+        # Clean src after install
+        if [ ${INSTANT_CLEAN_SRC_AFTER_INSTALL} = ON ]; then
+            if [ -f ${DOWNLOAD_PATH}/${NAME}${PACKING} ]; then
+                rm -f ${DOWNLOAD_PATH}/${NAME}${PACKING}
+            fi
+        fi
+
+        # Clean unpack directory after install
+        if [ ${INSTANT_CLEAN_UNPACK_AFTER_INSTALL} = ON ]; then
+            rm -rf ${UNPACK_PATH}/${EXTRACTSTO}
+        fi
     else
         if [ ! -z "${LOAD}" ]; then
             # Let the user know we're loading the current package

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.