From 364270b6c736471a3cbbb6a2de5c74e3ce7b4cd8 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 26 Jun 2015 17:43:29 +0200 Subject: [PATCH] scripts/Bootstrap/compile_pmodules.sh - cleanup $PMODULES_DIR before compiling --- scripts/Bootstrap/compile_pmodules.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Bootstrap/compile_pmodules.sh b/scripts/Bootstrap/compile_pmodules.sh index 45f457c..0b5ad0a 100755 --- a/scripts/Bootstrap/compile_pmodules.sh +++ b/scripts/Bootstrap/compile_pmodules.sh @@ -8,6 +8,10 @@ source "${BOOTSTRAP_DIR}/Pmodules_version.conf" unset PMODULES_HOME source "/opt/psi/config/environment.bash" +if [[ -n ${PMODULES_DIR} ]] && [[ "${PMODULES_DIR}" != "/" ]] && [[ -d "${PMODULES_DIR}" ]]; then + rm -rf "${PMODULES_DIR}" +fi + ${BOOTSTRAP_DIR}/coreutils/build --bootstrap --disable-cleanup || { echo "compiling 'coreutils' failed!"; exit 1; } ${BOOTSTRAP_DIR}/gettext/build --bootstrap --disable-cleanup || { echo "compiling 'gettext' failed!"; exit 1; } ${BOOTSTRAP_DIR}/getopt/build --bootstrap --disable-cleanup || { echo "compiling 'getopt' failed!"; exit 1; }