diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/scripts/build_docs.py | 7 | ||||
-rwxr-xr-x | src/scripts/install.py | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/scripts/build_docs.py b/src/scripts/build_docs.py index 94c61afdf..ca055ac05 100755 --- a/src/scripts/build_docs.py +++ b/src/scripts/build_docs.py @@ -105,6 +105,8 @@ def parse_options(args): def main(args=None): + # pylint: disable=too-many-branches,too-many-locals + if args is None: args = sys.argv @@ -122,6 +124,7 @@ def main(args=None): with_docs = bool(cfg['with_documentation']) with_sphinx = bool(cfg['with_sphinx']) with_pdf = bool(cfg['with_pdf']) + with_rst2man = bool(cfg['with_rst2man']) with_doxygen = bool(cfg['with_doxygen']) doc_stamp_file = cfg['doc_stamp_file'] @@ -154,6 +157,10 @@ def main(args=None): # otherwise just copy it cmds.append(['cp', manual_src, manual_output]) + if with_rst2man: + cmds.append(['rst2man', os.path.join(manual_src, 'cli.rst'), + os.path.join(cfg['build_dir'], 'botan.1')]) + cmds.append(['touch', doc_stamp_file]) for cmd in cmds: diff --git a/src/scripts/install.py b/src/scripts/install.py index d30493ebe..243d58eda 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -253,6 +253,13 @@ def main(args): for f in [f for f in os.listdir(cfg['doc_dir']) if f.endswith('.txt')]: copy_file(os.path.join(cfg['doc_dir'], f), prepend_destdir(os.path.join(target_doc_dir, f))) + if cfg['with_rst2man']: + man1_dir = prepend_destdir(os.path.join(options.prefix, os.path.join(cfg['mandir'], 'man1'))) + makedirs(man1_dir) + + copy_file(os.path.join(cfg['build_dir'], 'botan.1'), + os.path.join(man1_dir, 'botan.1')) + logging.info('Botan %s installation complete', cfg['version']) return 0 |