diff options
| author | EuAndreh <eu@euandre.org> | 2021-01-21 23:01:12 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2021-01-21 23:01:40 -0300 |
| commit | 60089ebe9551e4570dccfacabf6e9253701da668 (patch) | |
| tree | aae7c9506ae121b38f8472e3649c8c91a4970299 | |
| parent | fake-symlinks.sh: Add remembering repo (diff) | |
| download | dotfiles-60089ebe9551e4570dccfacabf6e9253701da668.tar.gz dotfiles-60089ebe9551e4570dccfacabf6e9253701da668.tar.xz | |
fake-symlinks: Add README.sh
| -rw-r--r-- | bash/fake-symlinks.sh | 1 | ||||
| -rwxr-xr-x | bash/templates/build-aux/workflow/README.sh | 29 | ||||
| -rwxr-xr-x | bash/templates/build-aux/workflow/TODOs.sh | 18 |
3 files changed, 39 insertions, 9 deletions
diff --git a/bash/fake-symlinks.sh b/bash/fake-symlinks.sh index 8efec972..5f048874 100644 --- a/bash/fake-symlinks.sh +++ b/bash/fake-symlinks.sh @@ -191,6 +191,7 @@ ln-build-aux() { cp-all build-aux/assert-todos.sh \ build-aux/assert-shellcheck.sh \ build-aux/workflow/TODOs.sh \ + build-aux/workflow/README.sh \ build-aux/workflow/style.css \ build-aux/workflow/preamble.md diff --git a/bash/templates/build-aux/workflow/README.sh b/bash/templates/build-aux/workflow/README.sh new file mode 100755 index 00000000..4da9bb5b --- /dev/null +++ b/bash/templates/build-aux/workflow/README.sh @@ -0,0 +1,29 @@ +#!/bin/sh +set -eu + +mkdir -p public + +PROJECT_UC="$1" +PROJECT="$2" + +RELEASES_LIST="$(mktemp)" +for version in $(git tag); do + echo "- version [$version](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz)" >> "$RELEASES_LIST" +done + +RELEASES="$(mktemp)" +if [ -s "$RELEASES_LIST" ]; then + printf '# Releases\n\n' >> "$RELEASES" + cat "$RELEASES_LIST" >> "$RELEASES" +fi + +cat README.md "$RELEASES" | \ + pandoc --toc \ + --highlight-style pygments \ + --toc-depth=2 \ + -s \ + --metadata title="$PROJECT_UC - TODOs" \ + --metadata lang=en \ + -r markdown \ + -w html \ + > public/index.html diff --git a/bash/templates/build-aux/workflow/TODOs.sh b/bash/templates/build-aux/workflow/TODOs.sh index 4a9eb65d..3f9fa4b8 100755 --- a/bash/templates/build-aux/workflow/TODOs.sh +++ b/bash/templates/build-aux/workflow/TODOs.sh @@ -11,13 +11,13 @@ REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#( envsubst < build-aux/workflow/preamble.md | \ printf '%s\n\n%s' "$(cat -)" "$(perl -pe "$REGEX" TODOs.md)" | \ - pandoc --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$1 - TODOs" \ - --metadata lang=en \ - -H build-aux/workflow/style.css \ - -r markdown \ - -w html \ + pandoc --toc \ + --highlight-style pygments \ + --toc-depth=2 \ + -s \ + --metadata title="$PROJECT_UC - TODOs" \ + --metadata lang=en \ + -r markdown \ + -w html \ + -H build-aux/workflow/style.css \ > public/TODOs.html |
