Allow further configuration of error patterns
This commit is contained in:
parent
b552242b47
commit
e19332314e
|
@ -51,13 +51,16 @@ RUN \
|
||||||
|| true && \
|
|| true && \
|
||||||
# Handle console output of MDK537 installer
|
# Handle console output of MDK537 installer
|
||||||
handle_output() { \
|
handle_output() { \
|
||||||
|
# A pattern that is supposed to indicates that wine got stuck
|
||||||
pattern="fixme:win:NtUserLockWindowUpdate ((nil))"; \
|
pattern="fixme:win:NtUserLockWindowUpdate ((nil))"; \
|
||||||
|
# The amount of times the pattern should occur for the process to be considered stuck
|
||||||
|
patternCount=2; \
|
||||||
output=$( \
|
output=$( \
|
||||||
sed \
|
sed \
|
||||||
# Handle exit hints
|
# Handle exit hints
|
||||||
-e "s/^exit \([[:digit:]]\+\)$/\1/; t end;" \
|
-e "s/^exit \([[:digit:]]\+\)$/\1/; t end;" \
|
||||||
# Handle multiple occurrences of $pattern
|
# 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
|
# Delete output and return to start
|
||||||
-e "d; b;" \
|
-e "d; b;" \
|
||||||
# Branch "stuck": delete output and exit with code 42
|
# Branch "stuck": delete output and exit with code 42
|
||||||
|
|
Loading…
Reference in a new issue