diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-11-23 00:04:59 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-11-23 00:04:59 +0100 |
| commit | da45e6f702d1ad7b5a4f7ada303b39b5a748f8c8 (patch) | |
| tree | daf2fa35e3986510aaa76a9161ba81f74a311d16 /post-receive-stagit | |
| parent | 9f045b99076fa30cb5a2eee08e3d9faf4d075af3 (diff) | |
| download | git-hooks-da45e6f702d1ad7b5a4f7ada303b39b5a748f8c8.tar.gz git-hooks-da45e6f702d1ad7b5a4f7ada303b39b5a748f8c8.zip | |
Moved down parts related to readme and download
Diffstat (limited to 'post-receive-stagit')
| -rwxr-xr-x | post-receive-stagit | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/post-receive-stagit b/post-receive-stagit index ac4f1e3..06448ef 100755 --- a/post-receive-stagit +++ b/post-receive-stagit | |||
| @@ -21,8 +21,6 @@ genstagit() { | |||
| 21 | cp -r "$repo" "$htdir" | 21 | cp -r "$repo" "$htdir" |
| 22 | cd "$htdir" | 22 | cd "$htdir" |
| 23 | stagit -l 100 "$repo" | 23 | stagit -l 100 "$repo" |
| 24 | git show master:README.md > file/README.md | ||
| 25 | git archive HEAD --prefix="$name/" -o "$basedir/$name.zip" | ||
| 26 | } | 24 | } |
| 27 | 25 | ||
| 28 | cpindexfile() { | 26 | cpindexfile() { |
| @@ -36,6 +34,8 @@ cpstylefiles() { | |||
| 36 | } | 34 | } |
| 37 | 35 | ||
| 38 | formatreadme() { | 36 | formatreadme() { |
| 37 | cd "$htdir" | ||
| 38 | git show master:README.md > file/README.md | ||
| 39 | printf '%s\n' \ | 39 | printf '%s\n' \ |
| 40 | g/class=\"line\"/d \ | 40 | g/class=\"line\"/d \ |
| 41 | "/<pre id=\"blob\">" d d i "$(lowdown file/README.md)" . w \ | 41 | "/<pre id=\"blob\">" d d i "$(lowdown file/README.md)" . w \ |
| @@ -43,6 +43,8 @@ formatreadme() { | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | adddownloadbutton() { | 45 | adddownloadbutton() { |
| 46 | cd "$htdir" | ||
| 47 | git archive HEAD --prefix="$name/" -o "$basedir/$name.zip" | ||
| 46 | printf '%s\n' \ | 48 | printf '%s\n' \ |
| 47 | "/log\.html\">Log<\/a>" i \ | 49 | "/log\.html\">Log<\/a>" i \ |
| 48 | "<a href=\"../$name.zip\">Download</a> |" . w \ | 50 | "<a href=\"../$name.zip\">Download</a> |" . w \ |
