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