site-josuah

/usr/josuah
Log | Files | Refs

commit fad04475eaaf43a086f789fab027d1e9cfbe6fd1
parent c8e47c7d3db769500e18788619345c0819754d68
Author: Josuah Demangeon <me@josuah.net>
Date:   Tue, 27 Oct 2020 00:20:10 +0100

integrate git hooks

Diffstat:
A.githooks/post-update | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/.githooks/post-update b/.githooks/post-update @@ -0,0 +1,11 @@ +#!/bin/sh -eux +path=$PWD +name=${PWD##*/} + +mkdir "/var/www/htdocs/git/$name" +cd "/var/www/htdocs/git/$name" +stagit "$path" + +cd /var/www/htdocs/git/ +stagit-index >index.html \ + $(printf '%s\n' /git/*/git-daemon-export-ok | sed 's,/[^/]*$,,')