]> nuage.metani.fr Git - 3GPP.git/blobdiff - bin/38331-convert.sh
38331-convert.sh now does all the processing
[3GPP.git] / bin / 38331-convert.sh
index ead185983d8c60cddbe4838df09fdf9f185598d8..cadce64f3787d07071a934cfe64b4a6bd28cd3c0 100755 (executable)
@@ -60,6 +60,9 @@ else
     LC_ALL=C sed -i 's/-- Cond N3C MP/-- Cond N3C-MP/' "${1%.docx}.txt"
     LC_ALL=C sed -i 's/^N3C MP/N3C-MP/' "${1%.docx}.txt"
     LC_ALL=C sed -i 's/-- Cond HOAndServCellAdd,$/-- Cond HOAndServCellAdd/' "${1%.docx}.txt"
     LC_ALL=C sed -i 's/-- Cond N3C MP/-- Cond N3C-MP/' "${1%.docx}.txt"
     LC_ALL=C sed -i 's/^N3C MP/N3C-MP/' "${1%.docx}.txt"
     LC_ALL=C sed -i 's/-- Cond HOAndServCellAdd,$/-- Cond HOAndServCellAdd/' "${1%.docx}.txt"
+
+    iconv -f UTF-8 -t ASCII//TRANSLIT "${1%.docx}.txt" > "${1%.docx}.ascii"
+    mv "${1%.docx}.ascii" "${1%.docx}.txt"
 fi       
 
 cat "${1%.docx}.txt" | awk '/^-- ASN1START$/,/^-- ASN1STOP$/' | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
 fi       
 
 cat "${1%.docx}.txt" | awk '/^-- ASN1START$/,/^-- ASN1STOP$/' | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
@@ -80,6 +83,7 @@ if [[ "$compare1" ]] ; then
     echo "  diff -b -B by-IE/${1%.docx}.asncheck ${1%.docx}.asncheck"
 else
     rm "${1%.docx}.asncheck"
     echo "  diff -b -B by-IE/${1%.docx}.asncheck ${1%.docx}.asncheck"
 else
     rm "${1%.docx}.asncheck"
+    asn1-split.awk "${1%.docx}.asn"
 fi
 
 cd ..
 fi
 
 cd ..
@@ -94,6 +98,7 @@ if [[ "$compare2" ]] ; then
     echo "  diff -b -B before-field/${1%.docx}.asncheck ${1%.docx}.asncheck"
 else
     rm "${1%.docx}.asncheck"
     echo "  diff -b -B before-field/${1%.docx}.asncheck ${1%.docx}.asncheck"
 else
     rm "${1%.docx}.asncheck"
+    asn1-split.awk "${1%.docx}.asn"
 fi
 
 cd ..
 fi
 
 cd ..