commit 701e248db393798264ff65e65c2cc606ed50bc8d parent 388feb5312574183cc7eb545b2c8ccba0e1bacdb Author: Josuah Demangeon <mail@josuah.net> Date: Sun, 6 Jan 2019 22:35:56 +0100 simplify stagit script Diffstat:
M | etc/git/public/hooks/post-receive.d/stagit | | | 22 | ++++++---------------- |
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/etc/git/public/hooks/post-receive.d/stagit b/etc/git/public/hooks/post-receive.d/stagit @@ -17,25 +17,15 @@ if { mkdir -p ${www}/${name} stagit } backtick x { elglob -0 x ../*/git-daemon-export-ok - pipeline { printf "%s\n" ${x} } - sed "s/[^/]*$//" + pipeline { printf "%s\n" ${x} } sed "s/[^/]*$//" } importas -s -d "\n" repolist x -if { - redirfd -w 1 ${www}/index.gph - stagit-gopher-index -b /git ${repolist} -} - if { ln -sf ../style.css ${www}/${name}/style.css } -if { - redirfd -w 1 ${www}/index.html - stagit-index ${repolist} -} +if { redirfd -w 1 ${www}/index.gph stagit-gopher-index -b /git ${repolist} } +if { redirfd -w 1 ${www}/index.html stagit-index ${repolist} } -background -d { - cd ${www}/${name} +cd ${www}/${name} - if { stagit-gopher -b /git/${name} -c ${git}/stagit/cache-gopher ${git} } - if { stagit ${git} -c ${git}/stagit/cache-html } -} +background -d { stagit-gopher -b /git/${name} -c ${git}/stagit/cache-gopher ${git} } +background -d { stagit ${git} -c ${git}/stagit/cache-html }