#!/bin/bash cd "$(dirname "$(readlink -e "$0")")" for i in {1..300}; do [ -d ~erich/.cache/ms-playwright/ ] && break sleep 1 done if ! cnt=$(su erich -c "npx playwright test"); then printf '%s\n' \ 'To: erich@eckner.net' \ 'From: erich@'"$(hostname)" \ 'Subject: playwright' \ '' \ 'Die Milchtankstelle hat neue Nachrichten:' \ '' \ "${cnt}" \ | sendmailadvanced -t fi