File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22# Build translated docs
3- # Expects input 'html' or 'latex', defaults to 'html'.
3+ # Expects input like 'html' and 'latex', defaults to 'html'.
44#
55# SPDX-License-Identifier: CC0-1.0
66
77set -xeu
88
9- format=" $1 "
10-
11- if [ -z " $format " ]; then
9+ if [ -z " $1 " ]; then
1210 format=html
13- elif [ ! " $format " = html ] && [ ! " $format " = latex ]; then
14- echo " Invalid format. Expected html or latex"
15- exit 1
11+ else
12+ format=" $1 "
1613fi
1714
1815# Fail earlier if required variables are not set
@@ -24,7 +21,7 @@ mkdir -p logs
2421# If version is 3.12 or older, set gettext_compact.
2522# This confval is not needed since 3.12.
2623# In 3.13, its presence messes 3.13's syntax checking (?)
27- opts=" -D language=${PYDOC_LANGUAGE} --keep-going -w ../../logs/sphinxwarnings.txt"
24+ opts=" -D language=${PYDOC_LANGUAGE} --keep-going -w ../../logs/sphinxwarnings- ${format} .txt"
2825minor_version=$( git -C cpython/Doc branch --show-current | sed ' s|^3\.||' )
2926if [ $minor_version -lt 12 ]; then
3027 opts=" $opts -D gettext_compact=False"
3330make -C cpython/Doc " ${format} " SPHINXOPTS=" ${opts} "
3431
3532# Remove empty file
36- if [ ! -s logs/sphinxwarnings.txt ]; then
37- rm logs/sphinxwarnings.txt
33+ if [ ! -s " logs/sphinxwarnings- ${format} .txt" ]; then
34+ rm " logs/sphinxwarnings- ${format} .txt"
3835fi
You can’t perform that action at this time.
0 commit comments