summaryrefslogtreecommitdiff
path: root/update-html.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update-html.sh')
-rwxr-xr-xupdate-html.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/update-html.sh b/update-html.sh
index 9c74b9c..448c853 100755
--- a/update-html.sh
+++ b/update-html.sh
@@ -16,9 +16,15 @@ md2ht() {
if ! [ -f "$src" ]
then
echo >&2 "File not found: $src"
- continue
+ return
+ fi
+ if [ "$dst" -nt "$src" ]
+ then
+ echo >&2 "[fresh] $src -> $dst"
+ return
+ else
+ echo >&2 "[updating] $src -> $dst"
fi
- echo "$src -> $dst"
title=$(sed 's/# //; s/&/\\&/; s_/_\\/_; q' "$src")
if [ "$src" = html/index.md ] # It's the root
then