Files
coding-bench/tasks/D/d-10/check.sh

11 lines
515 B
Bash
Executable File

#!/bin/sh
# Öffnet /work/index.html im Browser (ohne Netz) und arbeitet die Checkliste in check/check_task.py ab.
# Letzte Zeile ist JSON mit Score und Notiz. Screenshot und Bericht liegen danach in /checks/out.
cd /work || { echo '{"score": 0.0, "notes": "kein /work"}'; exit 0; }
python3 /checks/check_task.py 2>/tmp/check.err
status=$?
if [ $status -ne 0 ]; then
echo "{\"score\": 0.0, \"notes\": \"Prüfskript abgebrochen (Exit $status): $(tail -n 1 /tmp/check.err | tr '\"' "'" | cut -c1-160)\"}"
fi
exit 0