diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
commit | b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch) | |
tree | 1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/rules.d/scripts/mod/gendef.py | |
parent | Adding upstream version 5.10.209. (diff) | |
download | linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip |
Adding debian version 5.10.209-2.debian/5.10.209-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules.d/scripts/mod/gendef.py')
-rwxr-xr-x | debian/rules.d/scripts/mod/gendef.py | 20 |
1 files changed, 20 insertions, 0 deletions
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() |