optools/.githooks/pre-commit/01_asciiref_gen
2024-08-16 20:14:37 -04:00

17 lines
226 B
Bash

#!/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"