copied from preCICE tutorials
This commit is contained in:
parent
46a7e98752
commit
3f1b1a6d0f
68 changed files with 156449 additions and 0 deletions
18
preCICE_tools/log.sh
Normal file
18
preCICE_tools/log.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -e -u
|
||||
|
||||
CASENAME="$(pwd | xargs basename)"
|
||||
LOGFILE="$CASENAME.log"
|
||||
export LOGFILE
|
||||
|
||||
STARTDATE="$(date --rfc-email)"
|
||||
STARTTIME="$(date +%s)"
|
||||
echo "Started on: $STARTDATE" | tee "$CASENAME.log" 2>&1
|
||||
|
||||
close_log() {
|
||||
echo "Started on: $STARTDATE" | tee --append "$LOGFILE" 2>&1
|
||||
ENDDATE="$(date --rfc-email)"
|
||||
ENDTIME="$(date +%s)"
|
||||
echo "Finished on: $ENDDATE" | tee --append "$LOGFILE" 2>&1
|
||||
echo "Duration: $((ENDTIME-STARTTIME)) seconds (wall-clock time, including time waiting for participants)" | tee --append "$LOGFILE" 2>&1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue