5 echo "Syntax: $0 <build-dir>"
11 mkdir -p $BUILDDIR/htdocs
13 if ! which pandoc; then
14 echo "Please install pandoc to build the documentation files." > $BUILDDIR/htdocs/index.html
18 if ! which sphinx-build; then
19 echo "Please install sphinx-build to build the documentation files." > $BUILDDIR/htdocs/index.html
25 echo "Build dir: $BUILDDIR"
35 for chapter in $(seq 1 100); do
38 for file in $files; do
40 count=$(expr $count + 1)
43 if [ $count = 0 ]; then
46 echo " chapter-$chapter" >> index.rst
47 for file in $files; do
50 done | sed 's/<a id=".*"><\/a>//' | pandoc -f markdown_phpextra -t rst > chapter-$chapter.rst
53 sphinx-build -b html -d $BUILDDIR/doctrees . $BUILDDIR/htdocs