From 7570f5916e8985ee3371246c90aa98a0871f4088 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 14 Oct 2016 13:37:01 +0200 Subject: [PATCH] compile_pmodules: - do cleanup build and source directory by default - opt '--disable_cleanup' added - installation of modulecmd-binary added to post-install section of Module/build --- compile_pmodules.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compile_pmodules.sh b/compile_pmodules.sh index 77a753b..78cb01c 100755 --- a/compile_pmodules.sh +++ b/compile_pmodules.sh @@ -10,8 +10,12 @@ source "${BOOTSTRAP_DIR}/config/environment.bash" declare force='no' +declare opts='--bootstrap' while (( $# > 0 )); do case $1 in + --disable-cleanup ) + opts+=" $1" + ;; -f | --force ) force='yes' ;; @@ -36,7 +40,7 @@ build () { local -r version="$2" shift 2 - "${BOOTSTRAP_DIR}/Pmodules/modbuild" "${BOOTSTRAP_DIR}/${name}/build" --bootstrap --disable-cleanup "$@" "${version}" || \ + "${BOOTSTRAP_DIR}/Pmodules/modbuild" "${BOOTSTRAP_DIR}/${name}/build" ${opts} "$@" "${version}" || \ std::die 3 "Compiling '${name}' failed!" } @@ -65,7 +69,6 @@ if [[ ! -e "${PMODULES_HOME}/bin/tclsh" ]] || [[ ${force} == 'yes' ]]; then fi if [[ ! -e "${PMODULES_HOME}/libexec/modulecmd.bin" ]] || [[ ${force} == 'yes' ]]; then - build Modules "${MODULES_VERSION}" --compile && \ - cp -v "${PMODULES_TMPDIR}/build/Modules-${MODULES_VERSION}/modulecmd" "${PMODULES_HOME}/libexec/modulecmd.bin" + build Modules "${MODULES_VERSION}" --compile fi echo "Done..."