optools/.githooks/pre-commit/01_asciiref_gen

17 lines
226 B
Plaintext
Raw Normal View History

2024-08-16 20:14:37 -04:00
#!/bin/bash
origdir="${PWD}"
docsdir="${PWD}/ref/ascii/"
if ! command -v asciidoctor &> /dev/null;
then
exit 0
fi
cd "${docsdir}"
asciidoctor -o ascii.html ascii.adoc
cd ${origdir}
git add "${docsdir}/ascii.html"