summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2023-09-19 10:30:34 +0200
committerOto Šťáva <oto.stava@nic.cz>2023-09-25 12:58:17 +0200
commit89bf09f209f7268c38d536737b6250c9674c6907 (patch)
tree846a86d4de71f6dc13e8b938612287e94783e69b /scripts
parentkresctl: replace int literals with errno constants (diff)
downloadknot-resolver-89bf09f209f7268c38d536737b6250c9674c6907.tar.xz
knot-resolver-89bf09f209f7268c38d536737b6250c9674c6907.zip
scripts/make-doc.sh: minor improvements
Propagate errors, fix nit reported by shellcheck.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make-doc.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/scripts/make-doc.sh b/scripts/make-doc.sh
index fda206d8..6cefd6c5 100755
--- a/scripts/make-doc.sh
+++ b/scripts/make-doc.sh
@@ -1,6 +1,7 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
-cd "$(dirname ${0})/.."
+set -o errexit -o nounset
+cd "$(dirname "${0}")/.."
# generate JSON schema for the manager's declarative config
pushd manager
@@ -14,12 +15,6 @@ 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