From 551b07f4893ca57b9d820c62bbdd2ad3b3660c5c Mon Sep 17 00:00:00 2001 From: David Lecompte <3gpp@metani.eu> Date: Wed, 3 Jun 2026 15:05:39 +0200 Subject: [PATCH] Fix issues in docx2asn.sh --- bin/docx2asn.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/docx2asn.sh b/bin/docx2asn.sh index f29e8c9..77d3b35 100755 --- a/bin/docx2asn.sh +++ b/bin/docx2asn.sh @@ -11,7 +11,7 @@ if [[ ! -w . ]] ; then exit 1 fi -platform=$(uname -a) +platform=$(uname) case $platform in Linux) libreoffice="libreoffice" ;; @@ -54,7 +54,8 @@ while [ "$#" -gt 0 ]; do shift continue fi - + + sed -i 's/\r$//' "${1%.docx}.txt" cat "${1%.docx}.txt" | awk '/^-- ASN1START$/,/^-- ASN1STOP$/' | grep -Evxe '-- ASN1ST(ART|OP)' | grep -v '^--' | awk 'NF || p; { p = NF }' p=0 > "${1%.docx}.asn" if [[ -e "${1%.docx}.asn" ]] ; then -- 2.47.3