Skip to content

Commit

Permalink
Consistent file name when copying to target dir
Browse files Browse the repository at this point in the history
Modern Publican releases changed the way the generated PDF files are
named from 'book.pdf' to 'product-version-book-lang.pdf'

This causes broken links in MantisBT web site's documentation page, so
we rename the files as part of copying them to the target dir.

Fixes #23369
  • Loading branch information
dregad committed Sep 20, 2017
1 parent e8b45c2 commit b9cd8c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docbook-manual.py
Expand Up @@ -141,8 +141,11 @@ def main():

# Copy PDF and TXT files (if built)
for filetype in ['pdf', 'txt']:
for f in glob.glob(path.join(builddir, filetype, '*')):
shutil.copy2(f, installdir)
source = path.join(builddir, filetype, '*' + filetype)
for sourcefile in glob.glob(source):
dest = path.join(installdir, dir + '.' + filetype)
print "Copying '%s' to '%s'" % (sourcefile, dest)
shutil.copy2(sourcefile, dest)

os.system('publican clean')
print "\nBuild complete\n"
Expand Down

0 comments on commit b9cd8c7

Please sign in to comment.