copied from preCICE tutorials

This commit is contained in:
jakob.schratter 2026-01-26 16:14:46 +01:00
commit 3f1b1a6d0f
68 changed files with 156449 additions and 0 deletions

18
preCICE_tools/log.sh Normal file
View 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
}