From 8c60a2b9c53a1fa908e0f85cdb8b57269896b0b2 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 9 Jul 2012 17:47:38 +0200 Subject: [PATCH] Man page: Make target "netboot" go before "netboot2" --- doc/make_target_table.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/make_target_table.py b/doc/make_target_table.py index b72935fa..378ae53c 100755 --- a/doc/make_target_table.py +++ b/doc/make_target_table.py @@ -15,8 +15,13 @@ import glob import re +def key_netboot_before_netboot2((target_name, module)): + return target_name + '1' + + if __name__ == '__main__': extractor = re.compile('^modules/(([^ ]+)_target).py$') + targets = list() for filename in sorted(glob.glob('modules/*_target.py')): if 'generic' in filename: continue @@ -28,6 +33,9 @@ if __name__ == '__main__': __import__(module_name) module = _sys.modules[module_name] + targets.append((target_name, module)) + + for target_name, module in sorted(targets, key=key_netboot_before_netboot2): print('`%s`;;' % target_name) # Replace blank lines with `+` (asciidoc list item continuation) print(module.__doc__.strip().replace('\n\n', '\n+\n')) -- 2.26.2