From 01997497f915e8f79871f3f2acb55ac465051d24 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:59 +0200 Subject: Adding debian version 6.1.76-1. 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