New ML support - scripts fixed

This commit is contained in:
Robert Pelnar 2018-06-22 01:27:33 +02:00
parent 603ed49001
commit 834e0bd3f5
2 changed files with 2 additions and 2 deletions

View file

@ -91,7 +91,7 @@ generate_binary()
fi | sed 's/^\"\\x00\"$/\"\"/' > lang_$1.tmp
#create lang_xx.dat (binary text data file)
# cat lang_$1.tmp | sed 's/^\"/\/bin\/echo -e \"/;s/"$/\\x00\"/' > lang_$1.shx
cat lang_$1.tmp | sed 's/^\"/\/bin\/echo -e \"/;s/"$/\\x00\"/' | sh >lang_$1.dat
cat lang_$1.tmp | sed 's/^\"/\/bin\/echo -e -n \"/;s/"$/\\x00\"/' | sh >lang_$1.dat
#calculate number of strings
count=$(grep -c '^"' lang_$1.tmp)
echo "count="$count >&2

View file

@ -63,7 +63,7 @@ l=0
#create lang_xx_2.tmp (temporary text file from dictionary)
cat lang_$1.tmp | sed 's/^\"/printf \"\\x22/;s/"$/\\x22\\x0a\"/' | sh >lang_$1_2.tmp
#compare temporary files
diff lang_$1_2.tmp lang_$1_2.tmp >lang_$1_check.dif
diff -a lang_$1_1.tmp lang_$1_2.tmp >lang_$1_check.dif
dif=$(cat lang_$1_check.dif)
if [ -z "$dif" ]; then
echo 'binary data OK'