PPS: Just FYI, before the above snippet was roughed in, "make configure" from "$SAGE_ROOT" with embedded spaces indicates that "$SYSTEM_PACKAGES_FILE" need be properly quoted in "build/bin/sage-get-system-packages" and "src/doc/bootstrap", at least(?)
It couldn't be figured out why tons of sed 's complaints (related to the pathname with spaces) come from:
Any help is much appreciated.
<src/doc/bootstrap>for PKG_BASE in $(sage-package list --has-file SPKG.rst | sort); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
# Instead of just copying, we may want to call
# a version of sage-spkg-info to format extra information.
# for sphinx 4.4 we need to replace all direct links by some "extlink" (ticket 33272)
(echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info "$PKG_BASE") | sed -e "s|
https://trac.sagemath.org/ticket/\([0-9]*\)|:trac:\`\1\`|g" -e "s|
https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst
echo >> "$OUTPUT_INDEX" " $PKG_BASE"
done
</src/doc/bootstrap>