]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/udev/generate-keyboard-keys-gperf.sh
Merge pull request #16504 from poettering/read-file-ipc
[thirdparty/systemd.git] / src / udev / generate-keyboard-keys-gperf.sh
CommitLineData
7629744a 1#!/bin/sh
2set -eu
cc5549ca
ZJS
3
4awk '
5 BEGIN {
6 print "%{\n\
4831981d
SL
7#if __GNUC__ >= 7\n\
8_Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
9#endif\n\
10%}"
cc5549ca
ZJS
11 print "struct key_name { const char* name; unsigned short id; };"
12 print "%null-strings"
13 print "%%"
14 }
1b833237 15
cc5549ca
ZJS
16 /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
17 { print tolower($1) ", " $1 }
1b833237 18' < "$1"