source: branches/samba-3.5.x/source3/lib/ldb/docs/builddocs.sh

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.2 KB
Line 
1#!/bin/sh
2# build ldb docs
3# tridge@samba.org August 2006
4
5XSLTPROC="$1"
6SRCDIR="$2"
7
8if [ -z "$XSLTPROC" ] || [ ! -x "$XSLTPROC" ]; then
9 echo "xsltproc not installed"
10 exit 0
11fi
12
13MANXSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
14HTMLXSL="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
15
16mkdir -p man
17
18for f in $SRCDIR/man/*.xml; do
19 base=`basename $f .xml`
20 out=man/"`basename $base`"
21 if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
22 echo Processing manpage $f
23 $XSLTPROC --nonet -o "$out" "$MANXSL" $f
24 ret=$?
25 if [ "$ret" = "4" ]; then
26 echo "ignoring stylesheet error 4 for $MANXSL"
27 exit 0
28 fi
29 if [ "$ret" != "0" ]; then
30 echo "xsltproc failed with error $ret"
31 exit $ret
32 fi
33 fi
34done
35
36for f in $SRCDIR/man/*.xml; do
37 base=`basename $f .xml`
38 out=man/"`basename $base`".html
39 if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
40 echo Processing html $f
41 $XSLTPROC --nonet -o "$out" "$HTMLXSL" $f
42 ret=$?
43 if [ "$ret" = "4" ]; then
44 echo "ignoring stylesheet error 4 for $HTMLXSL"
45 exit 0
46 fi
47 if [ "$ret" != "0" ]; then
48 echo "xsltproc failed with error $ret"
49 exit $ret
50 fi
51 fi
52done
Note: See TracBrowser for help on using the repository browser.