stagit

my fork of stagit that runs this site
git clone git://git.jakekoroman.com/stagit
Log | Files | Refs | README | LICENSE

commit 6223885b6c2557038936b21d322852cadb65068e
parent 0c17b9386f58b1f35ddc2d21ed9eea88799c3341
Author: Jake Koroman <jakekoroman@gmail.com>
Date:   Sun,  4 Aug 2024 21:43:39 -0400

updated post-receive hook script

Diffstat:
Mexample_post-receive.sh | 6+++---
Dpost-receive | 24------------------------
2 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/example_post-receive.sh b/example_post-receive.sh @@ -19,9 +19,9 @@ fi # config # paths must be absolute. -reposdir="/home/src/src" +reposdir="/home/git/git/todisplay" dir="${reposdir}/${name}" -htmldir="/home/www/domains/git.codemadness.org/htdocs" +htmldir="/var/www/stagit" stagitdir="/" destdir="${htmldir}${stagitdir}" cachefile=".htmlcache" @@ -64,7 +64,7 @@ fi stagit-index "${reposdir}/"*/ > "${destdir}/index.html" # make pages. -stagit -c "${cachefile}" -u "https://git.codemadness.nl/$d/" "${reposdir}/${r}" +stagit -c "${cachefile}" -u "https://git.jakekoroman.com/$d/" "${reposdir}/${r}" ln -sf log.html index.html ln -sf ../style.css style.css diff --git a/post-receive b/post-receive @@ -1,24 +0,0 @@ -#!/bin/sh - -# detect git push -f -force=0 -while read -r old new ref; do - hasrevs=$(git rev-list "$old" "^$new" | sed 1q) - if test -n "$hasrevs"; then - force=1 - break - fi -done - -pagedir="/var/www/stagit/{REPO_DIR}" - -# remove commits and .cache on git push -f -if test "$force" = "1"; then - #rm -rf $pagedir/.cache - echo "force is on" -fi - -repodir=$(pwd) -cd $pagedir && stagit -c "$pagedir/.cache" -u "https://git.jakekoroman.xyz/$d/" "$repodir" - -echo "Updated stagit"