From e19332314ec8f273806437cd90c6771f1fb92f2d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 24 Mar 2023 22:55:00 +0000 Subject: [PATCH] Allow further configuration of error patterns --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 35bc8c4..3a02a5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,13 +51,16 @@ RUN \ || true && \ # Handle console output of MDK537 installer handle_output() { \ + # A pattern that is supposed to indicates that wine got stuck pattern="fixme:win:NtUserLockWindowUpdate ((nil))"; \ + # The amount of times the pattern should occur for the process to be considered stuck + patternCount=2; \ output=$( \ sed \ # Handle exit hints -e "s/^exit \([[:digit:]]\+\)$/\1/; t end;" \ # Handle multiple occurrences of $pattern - -e "/$pattern/{ x; s/^x\{1\}$/\0/; t stuck; s/^\(x*\)$/\1x/; x; };" \ + -e "/$pattern/{ x; s/^x\{$(expr $patternCount - 1)\}$/\0/; t stuck; s/^\(x*\)$/\1x/; x; };" \ # Delete output and return to start -e "d; b;" \ # Branch "stuck": delete output and exit with code 42