1. Search for '*.adoc' files
2. Test if filename.adoc is newer than filename.html
3. if so, run asciidoctor on it
find . -name '*.adoc' | while read FILE; do [ "${FILE}" -nt "${FILE%adoc}html" ] && asciidoctor -q "${FILE}" ; done
or put in a script:
#! /bin/bash
find . -name '*.adoc' | while read FILE; do
if [ "${FILE}" -nt "${FILE%adoc}html" ]; then
asciidoctor -q "${FILE}"
fi
done
The one-line or the script can be run from crontab each minut:
crontab -e
add a line
* * * * * /home/joe/update_adoc.bash