dockerfiles/gitolite-stagit/bin/build-stagit-index

17 lines
437 B
Plaintext
Raw Normal View History

2020-04-08 13:05:07 +02:00
#!/bin/sh
set -e
STAGIT_DIR="${STAGIT_DIR:-/var/lib/git/stagit}"
GL_REPO_BASE="${GL_REPO_BASE:-/var/lib/git/repositories}"
gitolite list-phy-repos | \
gitolite access % stagit R any | \
awk \
-F'\t' \
-v d="${GL_REPO_BASE}" \
'{if ($3 !~ "DENIED") print d"/"$1".git"}' | \
xargs -r /usr/local/bin/stagit-index | \
sed 's|\(<a href=".*\)/log.html\(">\)|\1\2|' > \
"${STAGIT_DIR}/index.html"