dot

packages and services management
Log | Files | Refs | README

commit 3da7e823c120063992546dedc376ea3dbe883d9f
parent b34f1353698916dc57b78d390cd69a9f5a06f51d
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Sat, 29 Jul 2017 20:24:32 +0200

bin/www-git: also show the commit notes in index.html

Diffstat:
Mbin/www-git | 12+++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/bin/www-git b/bin/www-git @@ -1,24 +1,22 @@ +NAME="${1##*/}" HEADER='<!doctype html><html><head><meta charset="utf-8"/></head><body><pre>' FOOTER='</pre></body></html>' - -name="${1##*/}" - -mkdir -p "git/$name/commit" "git/$name/file" -cd "git/$name" || exit 1 +mkdir -p "git/$NAME/commit" "git/$NAME/file" +cd "git/$NAME" || exit 1 # --- ./index.html --------------------------------------------------------------- { - printf '%s <h1><a href="..">&lt;</a> %s</h1>' "$HEADER" "$name" + printf '%s <h1><a href="..">&lt;</a> %s</h1>' "$HEADER" "$NAME" git -C "$1" ls-files | sed 's|.*|<a href="file/&">&</a>|' printf '<hr/>\n' git -C "$1" log --graph --date=short \ - --format='{%% %H %%} %cd%d%n%cn <%ce>%n %s%n' | + --format='{%% %H %%} %cd%d%n%cn <%ce>%n%n %s%n%n %N%n' | sed -r ' s|&|\&amp;|g s|<|\&lt;|g