diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/genLists4Comparizon.sh | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/genLists4Comparizon.sh b/tests/genLists4Comparizon.sh index 62f1718..ba3221d 100755 --- a/tests/genLists4Comparizon.sh +++ b/tests/genLists4Comparizon.sh @@ -9,8 +9,31 @@ xsltproc $ROOT/xslt/reg2ll.xsl $ROOT/rules/base.xml | sort | uniq > $F1 for i in $ROOT/symbols/*; do if [ -f $i ]; then id="`basename $i`" - gawk 'BEGIN{FS="\""}/^[[:space:]]*name\[Group1\][[:space:]]*=/{print $2;}' $i | while read name; do - echo "$id:\"$name\"" + gawk 'BEGIN{ + FS="\"" + isDefault=0; +} +/.*default.*/{ + isDefault=1; +} +/xkb_symbols/{ + variant=$2; +}/^[[:space:]]*name\[Group1\][[:space:]]*=/{ + if (isDefault==1) + { + printf "___ %s\n",$2; + isDefault=0; + } else + { + printf "%s %s\n",variant,$2; + } +}' $i | while read var name; do + # read one variable! + if [ "${var}" == "___" ]; then + echo "${id}:\"${name}\"" + else + echo "${id}(${var}):\"${name}\"" + fi done fi done | sort | uniq > $F2 |