From: Oto Šťáva Date: Wed, 10 Jan 2024 13:49:11 +0000 (+0100) Subject: scripts/make-doc.sh: backport changes from 6.0 X-Git-Tag: v5.7.1~8^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fenvironments%2Fdocs-develop-docs-05qey4%2Fdeployments%2F2994;p=thirdparty%2Fknot-resolver.git scripts/make-doc.sh: backport changes from 6.0 --- diff --git a/scripts/make-doc.sh b/scripts/make-doc.sh index d41e234c9..35c4e73a7 100755 --- a/scripts/make-doc.sh +++ b/scripts/make-doc.sh @@ -1,20 +1,15 @@ #!/bin/bash # SPDX-License-Identifier: GPL-3.0-or-later -cd "$(dirname ${0})/.." +set -o errexit -o nounset +cd "$(dirname "${0}")/.." pushd doc doxygen popd -SPHINX=$(command -v sphinx-build-3) -if [ $? -ne 0 ]; then - SPHINX=$(command -v sphinx-build) -fi - -set -o errexit -o nounset - +SPHINX=$(type -P sphinx-build-3 sphinx-build | head -n1) rm -rf doc/html -${SPHINX} ${@} -b html -d doc/.doctrees doc doc/html +"$SPHINX" "$@" -b html -d doc/.doctrees doc doc/html if command -v makeinfo &>/dev/null; then rm -rf doc/texinfo