diff options
author | EuAndreh <eu@euandre.org> | 2021-06-27 22:06:40 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-07-06 16:29:15 -0300 |
commit | 67f7c956239a7bc811a1d655d389666048e45fc3 (patch) | |
tree | e31dd02c3e591828313a9578ee82bca986038dcf /aux/workflow/public.sh | |
parent | TODOs.md: Mark #task-d6f1ddb3-2111-bcdb-1873-0a414a5f7157 as CANCELLED (diff) | |
download | git-permalink-67f7c956239a7bc811a1d655d389666048e45fc3.tar.gz git-permalink-67f7c956239a7bc811a1d655d389666048e45fc3.tar.xz |
Translate CHANGELOG.md adn README.md
Partially implements #task-7c5cd2aa-6d92-0423-bfa7-81f2e8436586.
As mentioned in the task, instead of making "README.md" as symlink to
"README.en.md", "README.md" is kept as it is, as the translated file
doesn't need to live in the repository. The same goes for the
"CHANGELOG.md" file.
Diffstat (limited to 'aux/workflow/public.sh')
-rwxr-xr-x | aux/workflow/public.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh index ef89d07..be32ac1 100755 --- a/aux/workflow/public.sh +++ b/aux/workflow/public.sh @@ -2,7 +2,7 @@ set -eu PROJECT_UC= -while getopts 'n:N:m:o:' flag; do +while getopts 'n:N:m:o:l:' flag; do case "$flag" in n) PROJECT="$OPTARG" @@ -16,6 +16,9 @@ while getopts 'n:N:m:o:' flag; do o) OUTDIR="$OPTARG" ;; + l) + LANGS="$OPTARG" + ;; *) exit 2 ;; @@ -41,12 +44,19 @@ fi mkdir -p "$OUTDIR" sh aux/workflow/TODOs.sh -N "$PROJECT_UC" -n "$PROJECT" -m "$MAILING_LIST" -o "$OUTDIR" -sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r README.md -w index.html +sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r README.md -w index.html -Len if [ -f CHANGELOG.md ]; then - sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r CHANGELOG.md + sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r CHANGELOG.md -Len +fi +if [ -n "${LANGS:-}" ]; then + for lang in $LANGS; do + sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r "README.$lang.md" -w "$lang/index.html" -L "$lang" + if [ -f CHANGELOG.md ]; then + sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r "CHANGELOG.$lang.md" -w "$lang/CHANGELOG.html" -L "$lang" + fi + done fi sh aux/ci/report.sh -n "$PROJECT" -o "$OUTDIR" - cp aux/workflow/favicon.svg aux/workflow/favicon.png "$OUTDIR" |