summaryrefslogtreecommitdiff
path: root/.config/git/git_template/hooks/post-receive
blob: f40fac080762d13df463ae7fb89e71f7e2f66b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh

repo="$(pwd | rev | cut -d '/' -f1 | rev)"
git --work-tree=/home/pico/git/"$repo" -git-dir=/home/pico/.local/git/"$repo" checkout -f

agefile="$(git rev-parse --git-dir)"/info/web/last-modified

mkdir -p "$(dirname "$agefile")" &&
git for-each-ref \
	--sort=-authordate --count=1 \
	--format='%(authordate:iso8601)' \
	>"$agefile"