tpost-receive.sh: create bare dir for https clone - stagit - [fork] customized build of stagit, the static git page generator
 (HTM) git clone git://src.adamsgaard.dk/stagit
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 907ac1bf0ed6720185fdfb55c14363fd50909e09
 (DIR) parent 308c83741eabd65b8d4362b81fe6ab5ac5011e81
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Sat, 28 Nov 2020 00:47:45 +0100
       
       post-receive.sh: create bare dir for https clone
       
       Diffstat:
         M post-receive.sh                     |       6 +++++-
       
       1 file changed, 5 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/post-receive.sh b/post-receive.sh
       t@@ -71,6 +71,10 @@ stagit-index "${reposdir}/"*/ > "${destdir}/index.html"
        # make pages.
        stagit -c "${cachefile}" "${reposdir}/${r}"
        
       +# make bare repo for https clone through alturl
       +(cd "${htmldir}" && git clone --bare "${reposdir}/${r}" "${r}.git" && \
       +        cd "${r}.git" && git update-server-info)
       +
        # disallow access to file and commit contents in parent robots.txt
        if ! grep -q "Disallow: /${r}/" "${destdir}/robots.txt"; then
                printf "Disallow: /%s/file/\nDisallow: /%s/commit/\n" \
       t@@ -96,7 +100,7 @@ if test "${force}" = "1"; then
        fi
        
        # make index.
       -stagit-gopher-index -b "${gopherstagitdir}" "${reposdir}/"*/ > "${destdir}/index.gph"
       +stagit-gopher-index -b "${gopherstagitdir}" "${reposdir}/"*/ > "${gopherdestdir}/index.gph"
        
        # make pages.
        stagit-gopher -b "${gopherstagitdir}/${d}" -c "${cachefile}" "${reposdir}/${r}"