From 03a68c82408cda204df37a05909fb841a5e9137f Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 20 Nov 2022 23:46:57 +0100 Subject: Some updates --- Makefile | 10 ++++++++-- post-receive-stagit | 17 +++++++++++++++-- update-all | 9 --------- 3 files changed, 23 insertions(+), 13 deletions(-) delete mode 100755 update-all diff --git a/Makefile b/Makefile index 68fff76..a226e5e 100644 --- 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 index 396eefd..7b5d992 100755 --- 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 deleted file mode 100755 index 890a1f5..0000000 --- a/update-all +++ /dev/null @@ -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 -- cgit v1.3