summaryrefslogtreecommitdiff
path: root/hooks/post-receive
blob: 77ffc887036cee2e7194a2efff8d9e4442f4b099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# This hook will update the static website whenever with new commits on each push.

export LC_TYPE="en_US.UTF-8"

www="/var/www/git"
src="$(pwd)"
name=$(basename "$src")
dst="$www/$(basename "$name" '.git')"

[ ! -d dst ] && mkdir -p "$dst"
cd "$dst" || exit 1

stagit "$src"

ln -sf log.html index.html
ln -sf ../style.css style.css
ln -sf ../logo.png logo.png