#!/bin/bash

last=""
while [ true ]; do
    now=$(find -name "*rst" -type f -printf "%T@ %Tx %TX %p\n" | sort -n -r | head -1)
    if [ "$last" != "$now" ]; then
        make html >/dev/null
        echo "Updated."
    fi
    last=$now
    sleep 1
done
