commit 2350811d821724fdf92c342b47645630c29a19a0
parent d3326be4f3ef2c41a009a4718d162162ef4f9127
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 27 Apr 2024 15:19:32 +0200
Ensure that overview links to README if present
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/bin/git_update_index_html.sh b/bin/git_update_index_html.sh
@@ -3,10 +3,15 @@
# $1 - HTML Root
# $2 - priv/pub
+# find respositories
REPOS=$(find "${1}"/"${2}" -maxdepth 1 | grep -E "\.git$" | sed -e 's/\s/\\ /g')
+# build index HTML
stagit-index $REPOS > "${1}/${2}/index.html"
+# ensure that repos link to index rather than log
+sed -e 's/log\.html/index.html/g' -i "${1}/${2}/index.html"
+
# linking assets
ln -sf "${1}/assets/style.css" "${1}/${2}/style.css"
ln -sf "${1}/assets/favicon.png" "${1}/${2}/favicon.png"