summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-07-18 15:07:55 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2009-07-18 15:07:55 +0200
commit04ff303730b3c6c38fd9d7df08f9e403ccd9de3c (patch)
treedf0453479533279634a41633b78f26fd9104b97e
parent9193c7df9ae55fd2d22ccb32473ed65bdec39f8b (diff)
extras/keymap: fix check-keymaps.sh for inline mappings
Do not complain about missing keymap files when giving scancode/keyname pairs on the keymap command line in the rules.
-rwxr-xr-xextras/keymap/check-keymaps.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/extras/keymap/check-keymaps.sh b/extras/keymap/check-keymaps.sh
index dc46f59531..15e8ef8c1e 100755
--- a/extras/keymap/check-keymaps.sh
+++ b/extras/keymap/check-keymaps.sh
@@ -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