forked from colomoto/bioLQM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-doc.sh
executable file
·41 lines (30 loc) · 942 Bytes
/
build-doc.sh
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
#!/bin/bash
# config: set source doc and output
DOC="doc"
OUT="target/site/doc"
function die(){
echo $1
exit 1
}
# make sure that it works when invoked from an other directory
cd `dirname $0`
# check for required commands and remove old output
command -v xsltproc > /dev/null || die "Command 'xsltproc' not found"
command -v mvn > /dev/null || die "Command 'mvn' not found"
command -v yelp-build > /dev/null || die "Command 'yelp-build' not found"
#test -e $OUT && echo "Confirm to remove '$OUT'..." && rm -Ir "$OUT"
# First build the javadoc
#mvn javadoc:javadoc
mkdir -p "$OUT"
cd $DOC
echo Generating $DOC ...
# generate biblio page if needed
if [ -e biblio.xml ]
then
xsltproc -o biblio.page xslt/biblio.xslt biblio.xml || exit 1
fi
# generate HTML version of the documentation
yelp-build html -x "xslt/custom.xslt" -o ../$OUT *.page || exit 1
# cleanup
test -e biblio.xml && test -e biblio.page && rm biblio.page
cd ..