4 ('llvmpipe', 'gallium/drivers/llvmpipe'),
5 ('postprocess', 'gallium/postprocess')
8 def create_redirect(dst
):
9 tpl
= '<html><head><meta http-equiv="refresh" content="0; url={0}"><script>window.location.replace("{0}")</script></head></html>'
10 return tpl
.format(dst
)
12 def create_redirects(app
, docname
):
13 if not app
.builder
.name
== 'html':
15 for src
, dst
in redirects
:
16 path
= os
.path
.join(app
.outdir
, '{0}.html'.format(src
))
17 url
= '{0}.html'.format(dst
)
18 with
open(path
, 'w') as f
:
19 f
.write(create_redirect(url
))
22 app
.connect('build-finished', create_redirects
)