commit 7a26fcdbde124718e097d0a7d5b8ae3b117a911f (patch)
parent 57ac036cf6fa523bc1d7d4e69613101a4159cd19
Author: Alex Karle <alex@alexkarle.com>
Date: Mon, 13 Jul 2020 00:05:47 -0400
stagit: Update post-receive to update the stagit-index
It recently came to my attention that the index has a "last edited"
timestamp, which requires regenerating the index on each commit...
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/stagit/post-receive b/stagit/post-receive
@@ -8,3 +8,7 @@ src="$(pwd)"
mkdir -p "$dst"
(cd "$dst" && stagit "$src")
cp -f "$dst/log.html" "$dst/index.html"
+
+# Assume run as git, so $HOME has the repos
+exported="$(ls $HOME/*.git/git-daemon-export-ok | sed 's/\/git-daemon-export-ok//g')"
+stagit-index $exported > /var/www/htdocs/git/index.html