luasec/doc/watch.sh

8 lines
208 B
Bash
Raw Normal View History

#!/bin/sh
while true; do
filename=$(inotifywait -qe close_write . --include '\.md$' --format '%f')
markdown < "$filename" > "$(basename "$filename" ".md").html"
echo "[$(date)] Updated $filename"
done