diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-07 21:52:55 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-07 21:52:55 +0200 |
| commit | 6ed532078680a6735811aa40a3b41c2a77c0da42 (patch) | |
| tree | 0b7b82443aa0c6941d603022bb6f959863d36a31 | |
| parent | 391065f33078e004ee3ff3614331631e5dc68584 (diff) | |
| download | git-hooks-6ed532078680a6735811aa40a3b41c2a77c0da42.tar.gz git-hooks-6ed532078680a6735811aa40a3b41c2a77c0da42.zip | |
Update index on every push
| -rw-r--r-- | Makefile | 6 | ||||
| -rwxr-xr-x | post-receive-stagit | 8 |
2 files changed, 5 insertions, 9 deletions
| @@ -1,4 +1,5 @@ | |||
| 1 | all: updateall index | 1 | all: push |
| 2 | ssh git@tronto.net /home/git/BIN/post-receive-stagit all | ||
| 2 | 3 | ||
| 3 | push: | 4 | push: |
| 4 | ssh git@tronto.net mkdir -p BIN FILES | 5 | ssh git@tronto.net mkdir -p BIN FILES |
| @@ -8,9 +9,6 @@ push: | |||
| 8 | index: push | 9 | index: push |
| 9 | ssh git@tronto.net /home/git/BIN/post-receive-stagit index | 10 | ssh git@tronto.net /home/git/BIN/post-receive-stagit index |
| 10 | 11 | ||
| 11 | updateall: push | ||
| 12 | ssh git@tronto.net /home/git/BIN/post-receive-stagit all | ||
| 13 | |||
| 14 | clean: | 12 | clean: |
| 15 | ssh git@tronto.net rm -r FILES/* BIN/* | 13 | ssh git@tronto.net rm -r FILES/* BIN/* |
| 16 | 14 | ||
diff --git a/post-receive-stagit b/post-receive-stagit index 99a4acd..586a533 100755 --- a/post-receive-stagit +++ b/post-receive-stagit | |||
| @@ -90,9 +90,7 @@ mkindex() { | |||
| 90 | changeindextitlestyle | 90 | changeindextitlestyle |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | if [ "$1" = "index" ]; then | 93 | if [ "$1" = "all" ]; then |
| 94 | mkindex | ||
| 95 | elif [ "$1" = "all" ]; then | ||
| 96 | for g in *.git; do | 94 | for g in *.git; do |
| 97 | cd $g | 95 | cd $g |
| 98 | cp $bindir/post-receive-stagit hooks/post-receive | 96 | cp $bindir/post-receive-stagit hooks/post-receive |
| @@ -100,7 +98,7 @@ elif [ "$1" = "all" ]; then | |||
| 100 | $bindir/post-receive-stagit | 98 | $bindir/post-receive-stagit |
| 101 | cd | 99 | cd |
| 102 | done | 100 | done |
| 103 | mkindex | 101 | elif [ "$1" != "index" ]; then |
| 104 | else | ||
| 105 | mkpage | 102 | mkpage |
| 106 | fi | 103 | fi |
| 104 | mkindex | ||
