stagit

static git page generator
git clone https://git.awy.one/stagit
Log | Files | Refs | README | LICENSE

docker/post-receive (470B) - raw


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# Author: Cale "poptart" Black
# License: MIT

set -euf
. /home/git/config.rc
export LC_CTYPE='en_US.UTF-8'
src="$(pwd)"
name=$(basename "$src")
dst="$WWW_HOME/$(basename "$name" '.git')"
mkdir -p "$dst"
cd "$dst" || exit 1
echo "[stagit] building $dst"
/usr/local/bin/stagit "$src"
echo "[stagit] linking $dst"
ln -sf log.html index.html
ln -sf ../style.css style.css
ln -sf ../logo.png logo.png
echo "[stagit] updating index"
/usr/local/bin/stagit-gen-index