diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-13 16:29:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-13 17:31:59 +0200 |
commit | a2095c06988499ee32e769de78663367495be33a (patch) | |
tree | ebd323b7509db03e360e5750455cd7e82a5996e4 /tools | |
parent | 97033ba455c4c1e359835879eee2e3c690395792 (diff) | |
download | systemd-a2095c06988499ee32e769de78663367495be33a.tar.gz |
update-man-rules: properly filter out directives index again
When directives-template.xml was created in 282230882cd0fc49b5377349f2aee22a1c9dd159,
this generator started picking it up. Let's filter it out properly again,
and also simply the filter while at it.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/update-man-rules.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/update-man-rules.py b/tools/update-man-rules.py index c404579a2a..f5db691f3e 100755 --- a/tools/update-man-rules.py +++ b/tools/update-man-rules.py @@ -4,16 +4,13 @@ from __future__ import print_function import collections import sys -import os.path import pprint +from os.path import basename from xml_helper import xml_parse def man(page, number): return '{}.{}'.format(page, number) -def xml(file): - return os.path.basename(file) - def add_rules(rules, name): xml = xml_parse(name) # print('parsing {}'.format(name), file=sys.stderr) @@ -78,9 +75,12 @@ def make_mesonfile(rules, dist_files): if __name__ == '__main__': pages = sys.argv[1:] + pages = (p for p in pages + if basename(p) not in { + 'systemd.directives.xml', + 'systemd.index.xml', + 'directives-template.xml'}) rules = create_rules(pages) - dist_files = (xml(file) for file in pages - if not file.endswith(".directives.xml") and - not file.endswith(".index.xml")) + dist_files = (basename(p) for p in pages) print(make_mesonfile(rules, dist_files)) |