fix-xmltest-log.sh: Rewrite in pure sed.

This removes the need for installing dos2unix in development and CI
environments.
This commit is contained in:
Dag-Erling Smørgrav 2024-04-22 16:37:00 +02:00
parent e0cf7c8544
commit 59295befca
4 changed files with 5 additions and 9 deletions

View file

@ -61,7 +61,6 @@ jobs:
cmake \ cmake \
docbook-xml \ docbook-xml \
docbook2x \ docbook2x \
dos2unix \
gcc-multilib \ gcc-multilib \
g++-multilib \ g++-multilib \
lcov \ lcov \

View file

@ -130,7 +130,6 @@ jobs:
sudo apt-get install --yes --no-install-recommends -V \ sudo apt-get install --yes --no-install-recommends -V \
cmake \ cmake \
docbook2x \ docbook2x \
dos2unix \
gcc-multilib \ gcc-multilib \
g++-multilib \ g++-multilib \
lcov \ lcov \

View file

@ -2,7 +2,6 @@ brew "autoconf"
brew "automake" brew "automake"
brew "cmake" brew "cmake"
brew "docbook2x" brew "docbook2x"
brew "dos2unix"
brew "gcc" brew "gcc"
brew "gettext" brew "gettext"
brew "ghostscript" brew "ghostscript"

View file

@ -32,10 +32,10 @@ set -e
filename="${1:-tests/xmltest.log}" filename="${1:-tests/xmltest.log}"
dos2unix "${filename}" sed -i.bak \
-e '# convert DOS line endings to Unix without resorting to dos2unix' \
tempfile="$(mktemp)" -e $'s/\r//' \
sed \ \
-e 's/^wine: Call .* msvcrt\.dll\._wperror, aborting$/ibm49i02.dtd: No such file or directory/' \ -e 's/^wine: Call .* msvcrt\.dll\._wperror, aborting$/ibm49i02.dtd: No such file or directory/' \
\ \
-e '/^wine: /d' \ -e '/^wine: /d' \
@ -46,5 +46,4 @@ sed \
-e '/^wine client error:/d' \ -e '/^wine client error:/d' \
-e '/^In ibm\/invalid\/P49\/: Unhandled exception: unimplemented .\+/d' \ -e '/^In ibm\/invalid\/P49\/: Unhandled exception: unimplemented .\+/d' \
\ \
"${filename}" > "${tempfile}" "${filename}"
mv "${tempfile}" "${filename}"