2016-07-06 12:48:12 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import sys, os, subprocess
|
|
|
|
|
|
|
|
cwd = os.path.dirname(__file__)
|
|
|
|
|
|
|
|
pod2man = None
|
|
|
|
for path in os.environ.get('PATH', '/bin:/usr/bin').split(':'):
|
|
|
|
sfile = '%s/pod2man' % path
|
|
|
|
if os.access(sfile, os.X_OK):
|
|
|
|
pod2man = sfile
|
|
|
|
break
|
|
|
|
|
|
|
|
if not pod2man:
|
|
|
|
sys.stderr.write('Perl is not installed\n')
|
|
|
|
sys.exit(1)
|
|
|
|
|
2019-06-01 14:29:41 +00:00
|
|
|
sys.stdout.write('Generating man pages...\n')
|
2016-07-06 12:48:12 +00:00
|
|
|
for root, sdir, lfiles in os.walk('%s/../src/tools' % cwd):
|
|
|
|
for sfile in lfiles:
|
|
|
|
if sfile.endswith('.pod'):
|
2019-06-01 14:29:41 +00:00
|
|
|
ifile = '%s/%s' % (root, sfile)
|
|
|
|
ofile = ifile.replace('.pod', '.1')
|
2016-07-06 12:48:12 +00:00
|
|
|
subprocess.check_call(
|
|
|
|
(pod2man,
|
2023-08-09 23:21:37 +03:00
|
|
|
'--release=Katie 4.14.0',
|
2016-07-06 12:48:12 +00:00
|
|
|
'--center=Katie Manual',
|
|
|
|
'--section=1',
|
|
|
|
'--utf8',
|
2019-06-01 14:29:41 +00:00
|
|
|
ifile,
|
2016-07-06 12:48:12 +00:00
|
|
|
ofile)
|
|
|
|
)
|