update-man-rules: properly filter out directives index again
When directives-template.xml was created in 282230882c
,
this generator started picking it up. Let's filter it out properly again,
and also simply the filter while at it.
This commit is contained in:
parent
97033ba455
commit
a2095c0698
|
@ -4,16 +4,13 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import collections
|
import collections
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
|
||||||
import pprint
|
import pprint
|
||||||
|
from os.path import basename
|
||||||
from xml_helper import xml_parse
|
from xml_helper import xml_parse
|
||||||
|
|
||||||
def man(page, number):
|
def man(page, number):
|
||||||
return '{}.{}'.format(page, number)
|
return '{}.{}'.format(page, number)
|
||||||
|
|
||||||
def xml(file):
|
|
||||||
return os.path.basename(file)
|
|
||||||
|
|
||||||
def add_rules(rules, name):
|
def add_rules(rules, name):
|
||||||
xml = xml_parse(name)
|
xml = xml_parse(name)
|
||||||
# print('parsing {}'.format(name), file=sys.stderr)
|
# print('parsing {}'.format(name), file=sys.stderr)
|
||||||
|
@ -78,9 +75,12 @@ def make_mesonfile(rules, dist_files):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pages = sys.argv[1:]
|
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)
|
rules = create_rules(pages)
|
||||||
dist_files = (xml(file) for file in pages
|
dist_files = (basename(p) for p in pages)
|
||||||
if not file.endswith(".directives.xml") and
|
|
||||||
not file.endswith(".index.xml"))
|
|
||||||
print(make_mesonfile(rules, dist_files))
|
print(make_mesonfile(rules, dist_files))
|
||||||
|
|
Loading…
Reference in a new issue