scripts: Allow to specify a limit on the number of tests reported
[sfrench/samba-autobuild/.git] / release-scripts / build-docs
1 #!/bin/sh
2
3 _exit() {
4         echo $@
5         popd
6         exit 1
7 }
8
9 DOCSRCDIR=`dirname $0`/../docs-xml
10
11 pushd $DOCSRCDIR || exit 1
12
13 git clean -d -x -f
14 export XML_CATALOG_FILES="file:///etc/xml/catalog file://$(pwd)/build/catalog.xml"
15 autoconf && \
16         ./configure --with-papersize=letter && \
17         make smbdotconf/parameters.all.xml && \
18         make release
19
20 if [ $? != 0 ]; then
21         _exit "Docs build failed!"
22 fi
23
24 mkdir -p ../docs
25 rsync -Ca --delete --exclude=.git output/ ../docs/
26 rsync -Ca --exclude=.svn registry ../docs/
27 rsync -Ca --exclude=.svn archives/ ../docs/
28
29 cd ../docs || _exit "Error changing dir to ${DOCSDIR}/../docs/"
30
31 /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test
32
33 cd ../docs-xml || _exit "Error changing dir to ${DOCSDIR}/../docs-xml/"
34 make distclean
35
36 echo "Success"
37 popd
38 exit