git-hooks

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.tronto.net/git-hooks
Download | Log | Files | Refs | README

commit 03a68c82408cda204df37a05909fb841a5e9137f
parent 52b0be81663df26b56002533ec93f8008db04d1a
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sun, 20 Nov 2022 23:46:57 +0100

Some updates

Diffstat:
MMakefile | 10++++++++--
Mpost-receive-stagit | 17+++++++++++++++--
Dupdate-all | 9---------
3 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,9 +1,15 @@ push: ssh git@tronto.net mkdir -p BIN FILES - scp post-receive-stagit update-all git@tronto.net:BIN/ + scp post-receive-stagit git@tronto.net:BIN/ scp bottom.html favicon.png logo.png style.css git@tronto.net:FILES/ +index: push + ssh git@tronto.net /home/git/BIN/post-receive-stagit index + +updateall: push + ssh git@tronto.net /home/git/BIN/post-receive-stagit all + clean: ssh git@tronto.net rm -r FILES/* BIN/* -.PHONY: clean push +.PHONY: clean index push updateall diff --git a/post-receive-stagit b/post-receive-stagit @@ -5,6 +5,7 @@ name="$(basename $repo .git)" basedir="/var/www/htdocs/git.tronto.net" htdir="$basedir/$name" filesdir="/home/git/FILES" +bindir="/home/git/BIN" setupinfo() { echo "Sebastiano Tronto" > owner @@ -85,5 +86,17 @@ mkindex() { changeindextitlestyle } -mkpage -mkindex +if [ "$1" = "index" ]; then + mkindex +elif [ "$1" = "all" ]; then + for g in *.git; do + cd $g + printf "#!/bin/sh\n\n$bindir/post-receive-stagit\n" >> \ + hooks/post-receive + $bindir/post-receive-stagit + cd + done + mkindex +else + mkpage +fi diff --git a/update-all b/update-all @@ -1,9 +0,0 @@ -#!/bin/sh - -for g in *.git; do - cd $g - printf '#!/bin/sh\n\n/home/git/BIN/post-receive-stagit\n' >> \ - hooks/post-receive - /home/git/BIN/post-receive-stagit - cd -done