blob: 2842a7fb68d58766d3aca75008b106a5683b8e00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/bin/sh
# build ldb docs
# tridge@samba.org August 2006
XSLTPROC="$1"
SRCDIR="$2"
if ! test -x "$XSLTPROC"; then
echo "xsltproc not installed"
exit 0
fi
# list of places to look for the docbook style sheet
manxsl=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
# list of places to look for the html style sheet
htmlxsl=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
manstyle=""
htmlstyle=""
for f in $manxsl; do
if [ -r "$f" ]; then
manstyle="$f"
fi
done
if [ -z "$manstyle" ]; then
echo "manpages/docbook.xsl not found on system"
exit 0
fi
for f in $htmlxsl; do
if [ -r "$f" ]; then
htmlstyle="$f"
fi
done
if [ -z "$htmlstyle" ]; then
echo "html/docbook.xsl not found on system"
exit 0
fi
mkdir -p man html
for f in $SRCDIR/man/*.xml; do
base=`basename $f .xml`
out=man/"`basename $base`"
if [ ! -f "$out" ] || [ "$base" -nt "$out" ]; then
echo Processing manpage $f
$XSLTPROC -o "$out" "$manstyle" $f || exit 1
fi
done
for f in $SRCDIR/man/*.xml; do
base=`basename $f .xml`
out=man/"`basename $base`".html
if [ ! -f "$out" ] || [ "$base" -nt "$out" ]; then
echo Processing html $f
$XSLTPROC -o "$out" "$htmlstyle" $f || exit 1
fi
done
|