aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rwxr-xr-xpost-receive-stagit17
-rwxr-xr-xupdate-all9
3 files changed, 23 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 68fff76..a226e5e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,15 @@
1push: 1push:
2 ssh git@tronto.net mkdir -p BIN FILES 2 ssh git@tronto.net mkdir -p BIN FILES
3 scp post-receive-stagit update-all git@tronto.net:BIN/ 3 scp post-receive-stagit git@tronto.net:BIN/
4 scp bottom.html favicon.png logo.png style.css git@tronto.net:FILES/ 4 scp bottom.html favicon.png logo.png style.css git@tronto.net:FILES/
5 5
6index: push
7 ssh git@tronto.net /home/git/BIN/post-receive-stagit index
8
9updateall: push
10 ssh git@tronto.net /home/git/BIN/post-receive-stagit all
11
6clean: 12clean:
7 ssh git@tronto.net rm -r FILES/* BIN/* 13 ssh git@tronto.net rm -r FILES/* BIN/*
8 14
9.PHONY: clean push 15.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)"
5basedir="/var/www/htdocs/git.tronto.net" 5basedir="/var/www/htdocs/git.tronto.net"
6htdir="$basedir/$name" 6htdir="$basedir/$name"
7filesdir="/home/git/FILES" 7filesdir="/home/git/FILES"
8bindir="/home/git/BIN"
8 9
9setupinfo() { 10setupinfo() {
10 echo "Sebastiano Tronto" > owner 11 echo "Sebastiano Tronto" > owner
@@ -85,5 +86,17 @@ mkindex() {
85 changeindextitlestyle 86 changeindextitlestyle
86} 87}
87 88
88mkpage 89if [ "$1" = "index" ]; then
89mkindex 90 mkindex
91elif [ "$1" = "all" ]; then
92 for g in *.git; do
93 cd $g
94 printf "#!/bin/sh\n\n$bindir/post-receive-stagit\n" >> \
95 hooks/post-receive
96 $bindir/post-receive-stagit
97 cd
98 done
99 mkindex
100else
101 mkpage
102fi
diff --git a/update-all b/update-all
deleted file mode 100755
index 890a1f5..0000000
--- a/update-all
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3for g in *.git; do
4 cd $g
5 printf '#!/bin/sh\n\n/home/git/BIN/post-receive-stagit\n' >> \
6 hooks/post-receive
7 /home/git/BIN/post-receive-stagit
8 cd
9done

Generated with cgit - Back to sebastiano.tronto.net