diff options
| -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 \ |
