Allow further configuration of error patterns
This commit is contained in:
parent
b552242b47
commit
e19332314e
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue