From d4fe0f59bda68416fbfd3e38989a5d47d7b26f53 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 23 Jun 2014 14:01:38 +0200 Subject: [PATCH] libem.bash: purge modules only if module is available --- lib/libem.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libem.bash b/lib/libem.bash index 475e24c..26a37f3 100644 --- a/lib/libem.bash +++ b/lib/libem.bash @@ -152,7 +152,9 @@ declare -x LIBRARY_PATH declare -x LD_LIBRARY_PATH declare -x DYLD_LIBRARY_PATH -module purge +if typeset -f module > /dev/null 2>&1 ; then + module purge +fi if [[ $DEBUG_ON ]]; then trap 'echo "$BASH_COMMAND"' DEBUG