| git.druid.rocks | index | druid520 | nscc | mk/ | dm.sh |
mk/dm.sh
set -e
# renders docs/*.btft into docs/man/ as troff man pages -- no
# style.btfs needed, a man page has no concept of a stylesheet.
docsdir="docs"
# resolved through PATH, same as mk.conf's cc="${CC:-cc}" -- never a
# hardcoded install location, so this works wherever btf2man actually
# is (a different PREFIX, a user-local install, anywhere on $PATH).
btf2man="${BTF2MAN:-btf2man}"
command -v "$btf2man" >/dev/null 2>&1 || { echo "err: $btf2man not found on \$PATH (see git://git.druid.rocks/druid520/btf.git)." >&2; exit 1; }
rm -rf "$docsdir/man"
mkdir -p "$docsdir/man"
"$btf2man" -o "$docsdir/man" "$docsdir"