]> nuage.metani.fr Git - 3GPP.git/blobdiff - bin/docx2asn.sh
Fix issues in docx2asn.sh
[3GPP.git] / bin / docx2asn.sh
index f29e8c98ab3e2677e34e38bc3bf4ba1a48bfe9ef..77d3b3579c691916366c9b66569bc2ec4ae75d48 100755 (executable)
@@ -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