timetable: prevent empty time lines

This commit is contained in:
Rodrigo Arias Mallo 2021-02-03 12:27:23 +01:00
parent e4e427b7f6
commit 32d8636ae1

View File

@ -20,11 +20,14 @@ stdenv.mkDerivation {
conf=garlic_config.json
for run in $(ls -d [0-9]* | sort -n); do
time=$(awk '/^ ?time /{print $2}' $run/stdout.log)
if [ -z "$time" ]; then
echo "error: cannot match \"time\" line
echo "check stdout log file: ${inputResult}/$exp/$unit/$run/stdout.log"
exit 1
fi
jq -cn "{ exp:\"$exp\", unit:\"$unit\", config:inputs, time:$time, run:$run }" $conf >> $out
done
done
done
#gzip $out
'';
}