Fixes log file conflicts if multiple users execute script on the same system.

This commit is contained in:
Christoph Niethammer 2013-03-13 11:01:32 +00:00
parent c16ffefcc0
commit 6307d69ef1

View file

@ -20,11 +20,12 @@ IGreen='\e[0;92m' # Intense Green
IRed='\e[0;91m' # Intense Red IRed='\e[0;91m' # Intense Red
# intermediate files, logfiles # intermediate files, logfiles
LOGDIR=${LOGDIR:=$PWD}
TMP=${TMP:=/tmp} TMP=${TMP:=/tmp}
logfile="check_modules.log" # logfile with detailed information logfile="$LOGDIR/check_modules.log" # logfile with detailed information
module_load_logfile="$TMP/.module_load.log" # output of 'module load commands module_load_logfile="$TMP/.module_load.$$.log" # output of 'module load commands
module_rm_logfile="$TMP/.module_rm.log" # output of 'module rm' commands module_rm_logfile="$TMP/.module_rm.$$.log" # output of 'module rm' commands
module_clean_env_file="$TMP/.module_clean_env" # original environment module_clean_env_file="$TMP/.module_clean_env.$$" # original environment
# safe the original environment # safe the original environment
set > $module_clean_env_file set > $module_clean_env_file