mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-16 23:41:16 -03:00
The help_sections.rs file was added to the tarball only as a quick hack. There is a cyclic dependency between docs and fish: "fish_indent" via "crates/build-man-pages" depends on "doc_src/". So every "touch doc_src/foo.rst && ninja -Cbuild sphinx-docs" re-builds fish. In future "fish_indent" should not depend on "crates/build-man-pages". Until then, a following commit wants to break this cyclic dependency in a different way: we won't embed man pages (matching historical behavior), which means that CMake builds won't need to run sphinx-build. But sphinx-build is also used for extracting help sections. Also, the fix for #12082 will use help sections elsewhere in the code. Prepare to remove the dependency on doc_src by committing the help sections (we already do elsewhere).
31 lines
471 B
Bash
Executable File
31 lines
471 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
|
|
shift
|
|
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"
|