do not edit — generated by btf.
git.druid.rocksindexdruid520mpmk/dh.sh

mk/dh.sh


set -e
 
# renders docs/*.btft (recursively, any subfolder included) into
# docs/html/, mirroring the relative path each source file has under
# docs/ -- run from the repo root, same as every other mk/*.sh (via
# "mk . dh" if the mk tool is installed, or plain "sh mk/dh.sh"/
# "make dh" otherwise).
docsdir="docs"
# resolved through PATH, same as mk.conf's cc="${CC:-cc}" -- never a
# hardcoded install location, so this works wherever btf2html actually
# is (a different PREFIX, a user-local install, anywhere on $PATH).
# never the plain generic name "btf" -- that monolithic tool doesn't
# exist anymore (btf.git split into btf2html/btf2man/md2btf/
# txt2btf), and even a leftover "btf" from an old install wouldn't
# take the same flags.
btf2html="${BTF2HTML:-btf2html}"
[ -f "$docsdir/style.btfs" ] || { echo "err: $docsdir/style.btfs missing." >&2; exit 1; }
command -v "$btf2html" >/dev/null 2>&1 || { echo "err: $btf2html not found on \$PATH (see git://git.druid.rocks/druid520/btf.git)." >&2; exit 1; }
rm -rf "$docsdir/html"
mkdir -p "$docsdir/html"
# -o takes an outdir relative to the CURRENT directory, not to the dir
# being rendered -- "$docsdir/html", not the tool's own "html" default,
# or this lands one level up (repo root) instead of inside docs/.
"$btf2html" -f -o "$docsdir/html" "$docsdir"
powered by btf.