diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-11-20 23:46:57 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-11-20 23:46:57 +0100 |
| commit | 03a68c82408cda204df37a05909fb841a5e9137f (patch) | |
| tree | 679f7382482ae69dd6a38464adc2cc3454239944 | |
| parent | 52b0be81663df26b56002533ec93f8008db04d1a (diff) | |
| download | git-hooks-03a68c82408cda204df37a05909fb841a5e9137f.tar.gz git-hooks-03a68c82408cda204df37a05909fb841a5e9137f.zip | |
Some updates
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 10 | ||||
| -rwxr-xr-x | post-receive-stagit | 17 | ||||
| -rwxr-xr-x | update-all | 9 |
3 files changed, 23 insertions, 13 deletions
| @@ -1,9 +1,15 @@ | |||
| 1 | push: | 1 | push: |
| 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 | ||
| 6 | index: push | ||
| 7 | ssh git@tronto.net /home/git/BIN/post-receive-stagit index | ||
| 8 | |||
| 9 | updateall: push | ||
| 10 | ssh git@tronto.net /home/git/BIN/post-receive-stagit all | ||
| 11 | |||
| 6 | clean: | 12 | clean: |
| 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)" | |||
| 5 | basedir="/var/www/htdocs/git.tronto.net" | 5 | basedir="/var/www/htdocs/git.tronto.net" |
| 6 | htdir="$basedir/$name" | 6 | htdir="$basedir/$name" |
| 7 | filesdir="/home/git/FILES" | 7 | filesdir="/home/git/FILES" |
| 8 | bindir="/home/git/BIN" | ||
| 8 | 9 | ||
| 9 | setupinfo() { | 10 | setupinfo() { |
| 10 | echo "Sebastiano Tronto" > owner | 11 | echo "Sebastiano Tronto" > owner |
| @@ -85,5 +86,17 @@ mkindex() { | |||
| 85 | changeindextitlestyle | 86 | changeindextitlestyle |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | mkpage | 89 | if [ "$1" = "index" ]; then |
| 89 | mkindex | 90 | mkindex |
| 91 | elif [ "$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 | ||
| 100 | else | ||
| 101 | mkpage | ||
| 102 | 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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | for 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 | ||
| 9 | done | ||
