Browse Source

Only build debconf if it exists

Not all branches have a debconf directory, so only build the guide if
the directory exists.

Change-Id: I3dda9da6f78b54a7f821562a04c1ba2d20823312
tags/1.3.0
Andreas Jaeger 3 years ago
parent
commit
4d7d799cc3
1 changed files with 17 additions and 14 deletions
  1. +17
    -14
      bin/doc-tools-check-languages

+ 17
- 14
bin/doc-tools-check-languages View File

@@ -121,20 +121,23 @@ function build_rst {

for tag in $INSTALL_TAGS; do
if [[ "$tag" == "debconf" ]]; then
# Build the guide with debconf
# To use debian only contents, use "debian" tag.
BUILD_DIR="${DOC_DIR}${book}-${tag}/build-${tag}/html"
DOCTREES="${BUILD_DIR}.doctrees"
tox -evenv -- sphinx-build -q -E -t debian \
-D language=${language} \
-d ${DOCTREES} \
${DOC_DIR}${book}-${tag}/source/ \
${BUILD_DIR}
PUBLISH_DIR=publish-docs/${language}/${book}-${tag}
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}-${tag}/build-${tag}/html/ \
${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
# Not all branches have this directory
if [[ -d ${DOC_DIR}${book}-${tag}/source ]] ; then
# Build the guide with debconf
# To use debian only contents, use "debian" tag.
BUILD_DIR="${DOC_DIR}${book}-${tag}/build-${tag}/html"
DOCTREES="${BUILD_DIR}.doctrees"
tox -evenv -- sphinx-build -q -E -t debian \
-D language=${language} \
-d ${DOCTREES} \
${DOC_DIR}${book}-${tag}/source/ \
${BUILD_DIR}
PUBLISH_DIR=publish-docs/${language}/${book}-${tag}
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}-${tag}/build-${tag}/html/ \
${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
fi
else
##
# Because Sphinx uses the first heading as title regardless of

Loading…
Cancel
Save