From 48d608898492ad529b3a906a45d1f45904393606 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Nov 02 2018 20:01:05 +0000 Subject: add build-translated.sh --- diff --git a/build-translated.sh b/build-translated.sh new file mode 100755 index 0000000..e449d89 --- /dev/null +++ b/build-translated.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ "$(uname)" == "Darwin" ]; then + # Running on macOS. + # Let's assume that the user has the Docker CE installed + # which doesn't require a root password. + docker run --rm -it -v $(pwd):/antora antora/antora --html-url-extension-style=indexify site-cs-CZ.yml + docker run --rm -it -v $(pwd):/antora antora/antora --html-url-extension-style=indexify site-fr-FR.yml + docker run --rm -it -v $(pwd):/antora antora/antora --html-url-extension-style=indexify site-jp-JP.yml + +elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + # Running on Linux. + # Let's assume that it's running the Docker deamon + # which requires root. + echo "" + echo "This build script is using Docker to run the build in an isolated environment. You might be asked for a root password in order to start it." + sudo docker run --rm -it -v $(pwd):/antora:z antora/antora --html-url-extension-style=indexify site-cs-CZ.yml + sudo docker run --rm -it -v $(pwd):/antora:z antora/antora --html-url-extension-style=indexify site-fr-FR.yml + sudo docker run --rm -it -v $(pwd):/antora:z antora/antora --html-url-extension-style=indexify site-jp-JP.yml +fi diff --git a/site-cs-CZ.yml b/site-cs-CZ.yml index 414ab7b..d9d8e9a 100644 --- a/site-cs-CZ.yml +++ b/site-cs-CZ.yml @@ -8,11 +8,11 @@ content: ##### Translated sources ##### - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: cs-CZ/docs/master + start_path: cs/docs/master - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: cs-CZ/fedora/f28 + start_path: cs/fedora/f28 - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: cs-CZ/fedora/f29 + start_path: cs/fedora/f29 ##### Original sources ##### diff --git a/site-fr-FR.yml b/site-fr-FR.yml index 7b13956..85e9582 100644 --- a/site-fr-FR.yml +++ b/site-fr-FR.yml @@ -8,11 +8,11 @@ content: ##### Translated sources ##### - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: fr-FR/docs/master + start_path: fr/docs/master - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: fr-FR/fedora/f28 + start_path: fr/fedora/f28 - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: fr-FR/fedora/f29 + start_path: fr/fedora/f29 ##### Original sources ##### diff --git a/site-jp-JP.yml b/site-jp-JP.yml index c98795b..2e00076 100644 --- a/site-jp-JP.yml +++ b/site-jp-JP.yml @@ -8,11 +8,11 @@ content: ##### Translated sources ##### - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: jp-JP/docs/master + start_path: jp/docs/master - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: jp-JP/fedora/f28 + start_path: jp/fedora/f28 - url: https://pagure.io/fedora-docs/translated-sources.git - start_path: jp-JP/fedora/f29 + start_path: jp/fedora/f29 ##### Original sources #####