]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/udev/generate-keyboard-keys-gperf.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / src / udev / generate-keyboard-keys-gperf.sh
1 #!/bin/sh
2 set -eu
3
4 awk '
5 BEGIN {
6 print "%{\n\
7 #if __GNUC__ >= 7\n\
8 _Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
9 #endif\n\
10 %}"
11 print "struct key_name { const char* name; unsigned short id; };"
12 print "%null-strings"
13 print "%%"
14 }
15
16 /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
17 { print tolower($1) ", " $1 }
18 ' < "$1"