katie/scripts/gendocs.py
Ivailo Monev 9bdaca4111 add link to Doxygen commands in gendocs script [ci skip]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-17 17:12:19 +02:00

25 lines
603 B
Python
Executable file

#!/usr/bin/python
# https://www.doxygen.nl/manual/commands.html
import sys, os, shutil, subprocess
cwd = os.path.dirname(__file__)
doxygen = None
for path in os.environ.get('PATH', '/bin:/usr/bin').split(':'):
sfile = '%s/doxygen' % path
if os.access(sfile, os.X_OK):
doxygen = sfile
break
if not doxygen:
sys.stderr.write('Doxygen is not installed\n')
sys.exit(1)
sys.stdout.write('Generating API docs for Katie...\n')
apidir = '%s/../apidocs' % cwd
if os.path.isdir(apidir):
shutil.rmtree(apidir)
subprocess.check_call((doxygen, '%s/../doxygen.conf' % cwd))