chiark / gitweb /
extras/keymap: fix check-keymaps.sh for inline mappings
authorMartin Pitt <martin.pitt@ubuntu.com>
Sat, 18 Jul 2009 13:07:55 +0000 (15:07 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sat, 18 Jul 2009 13:07:55 +0000 (15:07 +0200)
Do not complain about missing keymap files when giving scancode/keyname pairs
on the keymap command line in the rules.

extras/keymap/check-keymaps.sh

index dc46f595311c4513fe6aa04e17f5726891ef5458..15e8ef8c1ebe03c62e1dd981f4d9c62a5043616b 100755 (executable)
@@ -17,8 +17,11 @@ missing=$(join -v 2 <(awk '{print tolower(substr($1,5))}' $KEYLIST | sort -u) <(
 }
 
 # check that all maps referred to in $RULES exist
-maps=$(sed -rn '/keymap \$name/ { s/^.*\$name ([^"]+).*$/\1/; p }' $RULES)
+maps=$(sed -rn '/keymap \$name/ { s/^.*\$name ([^"[:space:]]+).*$/\1/; p }' $RULES)
 for m in $maps; do
+    # ignore inline mappings
+    [ "$m" = "${m#0x}" ] || continue
+
     [ -e keymaps/$m ] || {
        echo "ERROR: unknown map name in $RULES: $m" >&2
        exit 1