git-server

git server-side stuff | stagit
git clone git://git.ckyln.com/~cem/hooks.git
Log | Files | Refs | README

commit ba859ebf5b85b319cc78b625c8321c4162f12f36
parent 10a25c666a310b39f5f9a05f5491be0f8b3b6868
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 19 Jun 2020 08:18:15 +0300

post-receive: selective stagit index.

Diffstat:
Mpost-receive | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/post-receive b/post-receive @@ -31,9 +31,18 @@ done < mirrors printf '%s\n' "$BASE_URL/$repo" > url } +# Make sure we export the current repository. +# No, we don't want to run the 'export' command. +# shellcheck disable=2238 +:> export + # Create the stagit structure mkdir -p "$STAGIT_DIR/$repository" -stagit-index "$REPO_DIR"/* > "$STAGIT_DIR/index.html" + +# Generate the index for every exported repository +set -- +for repo in "$REPO_DIR/"*/export; do set -- "$@" "${repo%/*}"; done +stagit-index "$@" > "$STAGIT_DIR/index.html" # Install style files [ "$CSS" ] && install -Dm644 "$CSS" "$STAGIT_DIR/style.css"