Closes #13628 (grafted from e2daea2345354b0ea86eef6032eae6ea28596e2e) --HG-- branch : 6.0
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
OUTPUTDIR=`realpath "${1}"`
|
|
mkdir -p "${OUTPUTDIR}"
|
|
: ${DOC_BASE_URL:=${OUTPUTDIR}}
|
|
: ${MAX_PROCS:=$(( `nproc` * 2 ))}
|
|
export DOC_BASE_URL
|
|
|
|
pip install setuptools
|
|
find . -name 'cookiecutter*' -prune -o -path '*/doc/requirements-doc.txt' -print | while read path; do
|
|
pip install -r "${path}"
|
|
done
|
|
|
|
(find . -name 'cookiecutter*' -prune -o -path '*/doc/conf.py' -print | while read path; do
|
|
path=`dirname "${path}"`
|
|
path=`dirname "${path}"`
|
|
package=`basename "${path}"`
|
|
package=$(echo ${package} | sed "s/_/-/g")
|
|
if [ "${package}" = "trytond" ]; then
|
|
package="server"
|
|
elif [ "${package}" = "tryton" ]; then
|
|
package="client-desktop"
|
|
elif [ "${package}" = "proteus" ]; then
|
|
package="client-library"
|
|
elif [ "${package}" = "trytond-gis" ]; then
|
|
package="backend-gis"
|
|
elif [ "${package}" = "." ]; then
|
|
package=""
|
|
else
|
|
package="modules-${package}"
|
|
fi
|
|
echo "${path}/doc" "${OUTPUTDIR}/${package}"
|
|
done) | xargs --max-args=2 --max-procs=${MAX_PROCS} python -m sphinx -Q -T -E -b html
|