forked from rk-lindsey/chimes_lsq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_docs.sh
executable file
·51 lines (33 loc) · 1.07 KB
/
make_docs.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
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Check Sphinx version
ver=`sphinx-build --version 2>&1 | awk '/Sphinx/{split($2,s,"."); split(s[1],v,"v");print v[2]}'`
if [ $ver -lt 3 ] ; then
echo "Error: Please upgrade Sphinx to version 3 or greater"
exit 0
fi
# Remove any existing documentation .pdf
rm -f chimes_lsq.pdf
# Remove any build files, compile
cd doc
make clean
make html
make latex
# Convert built latex files to a .pdf, move to the docs folder
cd build/latex
TEXFILE="chimes_lsq.tex"
pdflatex $TEXFILE
cd ../..
cp build/latex/chimes_lsq.pdf .
echo ""
echo "*****************************************************************"
echo " DOCUMENTATION BUILT! "
echo "*****************************************************************"
echo ""
echo " To view documentation, either:"
echo " (1) Open ./docs/build/html/index.html in a browser (recommended)"
echo " (2) View ./docs/chimes_lsq.pdf"
echo ""
echo "Type \"make clean\" in ./doc to remove all built files."
echo ""
echo "*****************************************************************"
echo ""