Files
fish-shell/tests/test_functions/sphinx-shared.sh
Johannes Altmanninger 27db0e5fed Rename repo_root to workspace_root
This seems like a slightly better term
because I think it also applies to tarball.
Ref: https://github.com/fish-shell/fish-shell/pull/11785#discussion_r2335280389
2025-09-13 15:12:23 +02:00

29 lines
454 B
Bash
Executable File

#!/bin/sh
set -e
cleanup () {
if [ -n "$tmp_dir" ] && [ -e "$tmp_dir" ]; then
rm -r "$tmp_dir"
fi
}
trap cleanup EXIT INT TERM HUP
workspace_root=$(dirname "$0")/../..
builder=$1
docsrc=$workspace_root/doc_src
tmp_dir=$(mktemp -d)
doctree=$tmp_dir/doctree
output_dir=$tmp_dir/$builder
sphinx-build \
-j auto \
-q \
-W \
-E \
-b "$builder" \
-c "$docsrc" \
-d "$doctree" \
"$docsrc" \
"$output_dir"