summaryrefslogtreecommitdiff
path: root/post-update
blob: bef2cac97f30b6b097d7a0d06e5bafc9e00bc0fb (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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