]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/udev/generate-keyboard-keys-gperf.sh
libudev: hide definition of struct udev_list from other libudev components
[thirdparty/systemd.git] / src / udev / generate-keyboard-keys-gperf.sh
index eb977447e3c3b7c8026f18e9ca473bfc826622bb..c78652a8e9e9373aa0bcb90862462ef104c7da75 100755 (executable)
@@ -1,15 +1,18 @@
-#!/bin/sh -eu
-awk '   BEGIN {
-                print "%{\n\
+#!/bin/sh
+set -eu
+
+awk '
+    BEGIN {
+        print "%{\n\
 #if __GNUC__ >= 7\n\
 _Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
 #endif\n\
 %}"
-                print "struct key_name { const char* name; unsigned short id; };"
-                print "%null-strings"
-                print "%%"
-        }
+        print "struct key_name { const char* name; unsigned short id; };"
+        print "%null-strings"
+        print "%%"
+    }
 
-        /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
-                { print tolower($1) ", " $1 }
+    /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
+    { print tolower($1) ", " $1 }
 ' < "$1"