diff --git a/source/lib/ldb/docs/builddocs.sh b/source/lib/ldb/docs/builddocs.sh index 2842a7fb68d..b071f0f9549 100755 --- a/source/lib/ldb/docs/builddocs.sh +++ b/source/lib/ldb/docs/builddocs.sh @@ -10,53 +10,43 @@ if ! test -x "$XSLTPROC"; then 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 +MANXSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" +HTMLXSL="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl" 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 + if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then echo Processing manpage $f - $XSLTPROC -o "$out" "$manstyle" $f || exit 1 + $XSLTPROC --nonet -o "$out" "$MANXSL" $f + ret=$? + if [ "$ret" = "4" ]; then + echo "ignoring stylesheet error 4 for $MANXSL" + exit 0 + fi + if [ "$ret" != "0" ]; then + echo "xsltproc failed with error $ret" + exit $ret + fi 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 + if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then echo Processing html $f - $XSLTPROC -o "$out" "$htmlstyle" $f || exit 1 + $XSLTPROC --nonet -o "$out" "$HTMLXSL" $f + ret=$? + if [ "$ret" = "4" ]; then + echo "ignoring stylesheet error 4 for $HTMLXSL" + exit 0 + fi + if [ "$ret" != "0" ]; then + echo "xsltproc failed with error $ret" + exit $ret + fi fi done diff --git a/source/lib/ldb/man/ad2oLschema.1.xml b/source/lib/ldb/man/ad2oLschema.1.xml index a4e304f15f3..6ae89964775 100644 --- a/source/lib/ldb/man/ad2oLschema.1.xml +++ b/source/lib/ldb/man/ad2oLschema.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldb.3.xml b/source/lib/ldb/man/ldb.3.xml index bf306d787cd..6a3a7890342 100644 --- a/source/lib/ldb/man/ldb.3.xml +++ b/source/lib/ldb/man/ldb.3.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbadd.1.xml b/source/lib/ldb/man/ldbadd.1.xml index 11ed847b75e..7ad0f835d0f 100644 --- a/source/lib/ldb/man/ldbadd.1.xml +++ b/source/lib/ldb/man/ldbadd.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbdel.1.xml b/source/lib/ldb/man/ldbdel.1.xml index 51ae18e6855..7dfc7366f6b 100644 --- a/source/lib/ldb/man/ldbdel.1.xml +++ b/source/lib/ldb/man/ldbdel.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbedit.1.xml b/source/lib/ldb/man/ldbedit.1.xml index 3cfcce89f1b..15c69b1b255 100644 --- a/source/lib/ldb/man/ldbedit.1.xml +++ b/source/lib/ldb/man/ldbedit.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbmodify.1.xml b/source/lib/ldb/man/ldbmodify.1.xml index e936746ed7c..bc196477857 100644 --- a/source/lib/ldb/man/ldbmodify.1.xml +++ b/source/lib/ldb/man/ldbmodify.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbrename.1.xml b/source/lib/ldb/man/ldbrename.1.xml index b0480ca3667..391ec84ccc3 100644 --- a/source/lib/ldb/man/ldbrename.1.xml +++ b/source/lib/ldb/man/ldbrename.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/ldbsearch.1.xml b/source/lib/ldb/man/ldbsearch.1.xml index f287f3c2630..ed3749b9207 100644 --- a/source/lib/ldb/man/ldbsearch.1.xml +++ b/source/lib/ldb/man/ldbsearch.1.xml @@ -1,5 +1,5 @@ - + diff --git a/source/lib/ldb/man/oLschema2ldif.1.xml b/source/lib/ldb/man/oLschema2ldif.1.xml index b499da574e5..b1e681be4e4 100644 --- a/source/lib/ldb/man/oLschema2ldif.1.xml +++ b/source/lib/ldb/man/oLschema2ldif.1.xml @@ -1,5 +1,5 @@ - +