summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorsvu <svu>2005-07-31 22:54:39 +0000
committersvu <svu>2005-07-31 22:54:39 +0000
commit6039f8e276fe71c91d9f0c2d87bea98bc0cb8861 (patch)
treeb07aedc8c0559570ea093396c25ef758ccf15296 /tests
parent3489ceb6a924ee0aeac101c963ecd3b7ac8c9d1b (diff)
a bit better implementation of genLists4Comparizon.sh
Diffstat (limited to 'tests')
-rwxr-xr-xtests/genLists4Comparizon.sh26
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/genLists4Comparizon.sh b/tests/genLists4Comparizon.sh
index 79939d93..cbf2eefd 100755
--- a/tests/genLists4Comparizon.sh
+++ b/tests/genLists4Comparizon.sh
@@ -15,32 +15,28 @@ 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`"
+ export id
gawk 'BEGIN{
- FS="\""
- isDefault=0;
+ FS = "\"";
+ id = ENVIRON["id"];
+ isDefault = 0;
}
/.*default.*/{
- isDefault=1;
+ isDefault = 1;
}
/xkb_symbols/{
- variant=$2;
+ variant = $2;
}/^[[:space:]]*name\[Group1\][[:space:]]*=/{
- if (isDefault==1)
+ if (isDefault == 1)
{
- printf "___ %s\n",$2;
+ printf "%s:\"%s\"\n",id,$2;
isDefault=0;
} else
{
- printf "%s %s\n",variant,$2;
+ name=$2;
+ printf "%s(%s):\"%s\"\n", id, variant, name;
}
-}' $i | while read var name; do
- # read one variable!
- if [ "${var}" == "___" ]; then
- echo "${id}:\"${name}\""
- else
- echo "${id}(${var}):\"${name}\""
- fi
- done
+}' $i
fi
done | sort | uniq > $F2