27 lines
636 B
Plaintext
27 lines
636 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
PYSTAGIT_BASE="${PYSTAGIT_BASE:-/var/lib/git/stagit}"
|
||
|
GL_REPO_BASE="${GL_REPO_BASE:-/var/lib/git/repositories}"
|
||
|
|
||
|
mk_index () {
|
||
|
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|' > \
|
||
|
"${1}/index.html"
|
||
|
}
|
||
|
|
||
|
if [ -n "${SITES}" ]; then
|
||
|
for site in ${SITES}; do
|
||
|
mk_index "${PYSTAGIT_BASE}-${site}"
|
||
|
done
|
||
|
else
|
||
|
mk_index "${PYSTAGIT_BASE}"
|
||
|
fi
|