build: Add dist check script that checks if there are unsupported devices

This commit is contained in:
Marco Trevisan (Treviño)
2026-07-24 10:44:26 +00:00
committed by Marco Trevisan
parent 5113f7ec3b
commit c890325589
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -4,6 +4,7 @@
# fprint-list-udev-hwdb.c from the libfprint wiki page.
import argparse
import os
import re
import sys
from urllib.request import urlopen
@@ -40,6 +41,11 @@ def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("source_file", help="Path to hwdb file")
parser.add_argument("--url", default=DEFAULT_URL, help="Wiki page URL")
parser.add_argument(
"--check",
action="store_true",
help="Do not modify files, fail if an update is needed",
)
args = parser.parse_args()
entries = parse_entries(fetch(args.url))
@@ -61,6 +67,10 @@ def main():
print("allowlist_id_table is already up to date")
return
if args.check:
print("allowlist_id_table is out of date", file=sys.stderr)
sys.exit(1)
with open(args.source_file, "w", encoding="utf-8") as f:
f.write(new_content)