From 2800838879e9d0141a47c06158b815f479d9fd99 Mon Sep 17 00:00:00 2001 From: Pablo Escobar <pescobar001@gmail.com> Date: Mon, 20 Mar 2017 12:28:35 +0100 Subject: [PATCH] check the exit status when deleting tmp dir --- scripts/ost-nightly-build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/ost-nightly-build.sh b/scripts/ost-nightly-build.sh index 1285cd65d..2c93c5c7d 100644 --- a/scripts/ost-nightly-build.sh +++ b/scripts/ost-nightly-build.sh @@ -80,8 +80,13 @@ if [[ $? != 0 ]]; then else echo -e "\nBuild completed succesfully. Deleting temp dir $TEMP_DIR" rm -fr $TEMP_DIR - echo -e "\nrun 'module use $INSTALL_DIR/modules/all/' to add the new modules to your \$MODULEPATH" - echo -e "If you don't see the new module try deleting your Lmod's cache doing 'rm ~/.lmod.d/.cache/*'\n" + if [[ $? != 0 ]]; then + echo -e "\nError deling temp dir in $TEMP_DIR" + exit 1 + else + echo -e "\nrun 'module use $INSTALL_DIR/modules/all/' to add the new modules to your \$MODULEPATH" + echo -e "If you don't see the new module try deleting your Lmod's cache doing 'rm ~/.lmod.d/.cache/*'\n" + fi fi -- GitLab