git-server

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

commit 74cf3af80ae89bde8d6ec7f6d9bfc7448e65f204
parent 1c7248d32b1548dcf78647e559959d5ae554ebab
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun, 16 Aug 2020 13:57:51 +0300

fix index output

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

diff --git a/post-receive b/post-receive @@ -40,9 +40,11 @@ stagit-index "$@" | sed 's|log\.html|index.html|' | sed "s|<title>Repositories</title>|<title>${TITLE:-Repositories}</title>|" | sed "s|\"desc\">Repositories|\"desc\">${TITLE:-Repositories}|" | - { - [ "$EXTERN_URL" ] && sed "s|<img|<a href=\"$EXTERN_URL\"><img|;s|</td>\$|</a></td>|" - } > "$STAGIT_DIR/index.html" + if [ "$EXTERN_URL" ]; then + sed "s|<img|<a href=\"$EXTERN_URL\"><img|;s|</td>\$|</a></td>|" + else + cat + fi > "$STAGIT_DIR/index.html" # Install style files [ "$CSS" ] && install -Dm644 "$CSS" "$STAGIT_DIR/style.css"