X-Git-Url: https://nuage.metani.fr/gitweb/3GPP.git/blobdiff_plain/9fbf535ed3783dcb7f399c7da0c08099f6aa951d..a7d4762dc850321a38164c11244278b128562569:/bin/38331-convert.sh?ds=inline diff --git a/bin/38331-convert.sh b/bin/38331-convert.sh index cd8267b..ead1859 100755 --- a/bin/38331-convert.sh +++ b/bin/38331-convert.sh @@ -69,28 +69,34 @@ if [[ ! -e "${1%.docx}.asncheck" ]] ; then exit fi -txt2asn.awk "${1%.docx}.txt" > "${1%.docx}-descriptions-at-IEs-end.asn" -cat "${1%.docx}-descriptions-at-IEs-end.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}-descriptions-at-IEs-end.asncheck" -compare1=$(diff -b -B "${1%.docx}.asncheck" "${1%.docx}-descriptions-at-IEs-end.asncheck") +mkdir -p by-IE +cd by-IE +txt2asn.awk "../${1%.docx}.txt" > "${1%.docx}.asn" +cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck" +compare1=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck") if [[ "$compare1" ]] ; then - echo "The ASN.1 in ${1%.docx}-descriptions-at-IEs-end.asn does not fully match with the ASN.1 in ${1%.docx}.asncheck" + echo "The ASN.1 in by-IE/${1%.docx}.asn does not fully match with the ASN.1 in ${1%.docx}.asncheck" echo "Check with:" - echo " diff -b -B ${1%.docx}.asncheck ${1%.docx}-descriptions-at-IEs-end.asncheck" + echo " diff -b -B by-IE/${1%.docx}.asncheck ${1%.docx}.asncheck" else - rm "${1%.docx}-descriptions-at-IEs-end.asncheck" + rm "${1%.docx}.asncheck" fi -txt2asn-integrated.awk "${1%.docx}.txt" > "${1%.docx}-description-before-field.asn" -cat "${1%.docx}-description-before-field.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}-description-before-field.asncheck" -compare2=$(diff -b -B "${1%.docx}.asncheck" "${1%.docx}-description-before-field.asncheck") +cd .. +mkdir -p before-field +cd before-field +txt2asn-integrated.awk "../${1%.docx}.txt" > "${1%.docx}.asn" +cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck" +compare2=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck") if [[ "$compare2" ]] ; then - echo "The ASN.1 in ${1%.docx}-description-before-field.asn does not fully match with the ASN.1 in ${1%.docx}.asncheck" + echo "The ASN.1 in before-field/${1%.docx}.asn does not fully match with the ASN.1 in ${1%.docx}.asncheck" echo "Check with:" - echo " diff -b -B ${1%.docx}.asncheck ${1%.docx}-description-before-field.asncheck" + echo " diff -b -B before-field/${1%.docx}.asncheck ${1%.docx}.asncheck" else - rm "${1%.docx}-description-before-field.asncheck" + rm "${1%.docx}.asncheck" fi +cd .. if [[ "$compare1" ]] || [[ "$compare1" ]] ; then exit else