7 #######################################################
10 '/usr/share/sgml/docbook/xsl-stylesheets',
12 '/usr/share/docbook-xsl',
14 '/usr/share/xml/docbook/stylesheet/nwalsh',
16 '/usr/share/xml/docbook/stylesheet/nwalsh/current',
18 '/usr/local/share/xsl/docbook',
20 '/usr/share/sgml/docbook/xsl-stylesheets-*',
21 # Please add your OS's location here if not listed!
23 #######################################################
25 tools_bin_dir
= os
.path
.dirname(sys
.argv
[0])
26 xsl_dir
= os
.path
.join(tools_bin_dir
, '..', 'xsl')
28 if os
.path
.exists(xsl_dir
):
29 print "XSL directory %s already exists" % (xsl_dir
,)
32 for i
in candidate_xsldirs
:
34 # Crude method of preferring the highest version, when multiple exist
38 if os
.path
.exists(os
.path
.join(j
, 'html', 'docbook.xsl')):
39 os
.symlink(j
, xsl_dir
)
40 print "Found and linked %s" % (j
,)
43 sys
.stderr
.write('ERROR: Failed to find a DocBook XSL directory\n')