summaryrefslogtreecommitdiff
path: root/post-update
diff options
context:
space:
mode:
authorGravatar steering7253 <steering7253@proton.me>2026-04-18 03:55:33 -0600
committerGravatar steering7253 <steering7253@proton.me>2026-04-18 03:55:33 -0600
commitb672cd74f9cf11844e8adcbee98a84ecfa9095ea (patch)
tree21aafc45ee94d9a6cb3fb04318100f903c9512f9 /post-update
Diffstat (limited to 'post-update')
-rwxr-xr-xpost-update16
1 files changed, 16 insertions, 0 deletions
diff --git a/post-update b/post-update
new file mode 100755
index 0000000..bef2cac
--- /dev/null
+++ b/post-update
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+default_branch="$(git rev-parse --abbrev-ref HEAD)"
+default_branch_path="$(git rev-parse --symbolic-full-name HEAD)"
+
+if git show "$default_branch":README.md >/dev/null 2>&1; then
+ git show "$default_branch":README.md | tee info/web/README.md | cmark >info/web/README.html
+else
+ if git show "$default_branch":README.html >/dev/null 2>&1; then
+ git show "$default_branch":README.html >info/web/README.html
+ else
+ rm -f info/web/README.html
+ fi
+fi
+TZ= date +'%Y-%m-%d %H:%M:%S %z' >last-modified
+exec git update-server-info