]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/make-doc.sh: backport changes from 6.0 docs-develop-docs-05qey4/deployments/2994
authorOto Šťáva <oto.stava@nic.cz>
Wed, 10 Jan 2024 13:49:11 +0000 (14:49 +0100)
committerOto Šťáva <oto.stava@nic.cz>
Wed, 10 Jan 2024 13:49:11 +0000 (14:49 +0100)
scripts/make-doc.sh

index d41e234c938d159530f4b7058af8cf07cf1a21a5..35c4e73a716be3a05eb2d22592481d73905e34ee 100755 (executable)
@@ -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