stagit-scripts

Static git repository setup scripts
git clone https://www.brianlane.com/git/stagit-scripts
Log | Files | Refs | README

commit a7572e57fd76572c5e1ab344abb398a952a099bd
parent c91841ce5848ba7ec6faf9f4b6ca7b08cecd1c8e
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sun, 19 Oct 2025 09:34:37 -0700

post-receive: Exit early if stagit tools fail

Diffstat:
Mpost-receive | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/post-receive b/post-receive @@ -10,6 +10,7 @@ # NOTE: needs to be set for correct locale (expects UTF-8) otherwise the # default is LC_CTYPE="POSIX". +set -e export LC_CTYPE="en_US.UTF-8" name="$1" @@ -61,14 +62,14 @@ if test "${force}" = "1"; then fi # make index. -stagit-index "${reposdir}/"*/ > "${destdir}/index.html" +stagit-index "${reposdir}/"*/ > "${destdir}/index.html" || exit 1 # Create the URL for clone echo "${BASEURL}/${name}" > url git update-server-info # make pages. -stagit -c "${cachefile}" "${reposdir}/${name}" +stagit -c "${cachefile}" "${reposdir}/${name}" || exit 2 ln -sf log.html index.html ln -sf ../style.css style.css