git-hooks

Git hooks for my repositories
git clone https://git.tronto.net/git-hooks
Download | Log | Files | Refs | README

commit da45e6f702d1ad7b5a4f7ada303b39b5a748f8c8
parent 9f045b99076fa30cb5a2eee08e3d9faf4d075af3
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Wed, 23 Nov 2022 00:04:59 +0100

Moved down parts related to readme and download

Diffstat:
Mpost-receive-stagit | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/post-receive-stagit b/post-receive-stagit @@ -21,8 +21,6 @@ genstagit() { cp -r "$repo" "$htdir" cd "$htdir" stagit -l 100 "$repo" - git show master:README.md > file/README.md - git archive HEAD --prefix="$name/" -o "$basedir/$name.zip" } cpindexfile() { @@ -36,6 +34,8 @@ cpstylefiles() { } formatreadme() { + cd "$htdir" + git show master:README.md > file/README.md printf '%s\n' \ g/class=\"line\"/d \ "/<pre id=\"blob\">" d d i "$(lowdown file/README.md)" . w \ @@ -43,6 +43,8 @@ formatreadme() { } adddownloadbutton() { + cd "$htdir" + git archive HEAD --prefix="$name/" -o "$basedir/$name.zip" printf '%s\n' \ "/log\.html\">Log<\/a>" i \ "<a href=\"../$name.zip\">Download</a> |" . w \