From b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:06:00 +0200 Subject: Adding debian version 5.10.209-2. Signed-off-by: Daniel Baumann --- debian/rules.d/scripts/mod/gendef.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 debian/rules.d/scripts/mod/gendef.py (limited to 'debian/rules.d/scripts/mod/gendef.py') diff --git a/debian/rules.d/scripts/mod/gendef.py b/debian/rules.d/scripts/mod/gendef.py new file mode 100755 index 000000000..55d3fc60e --- /dev/null +++ b/debian/rules.d/scripts/mod/gendef.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 +import re +import sys + +for line in open(sys.argv[1]): + match = re.search(r'getopt\(argc, argv, "([\w:]*?)"\)', line) + if match: + options = match.group(1) + break +else: + raise RuntimeError + +print('#define GETOPT_OPTIONS "%s"' % options) + +print('#define GETOPT_CASE', end=' ') +for c in options: + if c == ':' or c == 'T': + continue + print("case '%c':" % c, end=' ') +print() -- cgit v1.2.3