Commit d097c276 authored by Andreas Böttger's avatar Andreas Böttger 😬
Browse files

Update .gitlab-ci.yml

parent f1b9bb1a
Pipeline #33368 passed with stages
in 1 minute and 20 seconds
......@@ -109,8 +109,10 @@ build_pages:
script:
- |
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
set -x
(grep -rlP '\.\.\/abb\/' ./_raw/study-book || true) | while read -r line; do
(grep -rlP '\.\.\/abb\/' ./_raw/study-book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
export lang
......@@ -121,6 +123,7 @@ build_pages:
)
- |
(
set -x
cd ./_raw/study-book;
if [ -f book.json ]; then
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json;
......@@ -137,17 +140,20 @@ build_pages:
- |
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
grep -rlP '\.\.\/abb\/' ./_raw/book | while read -r line; do
set -x
(grep -rlP '\.\.\/abb\/' ./_raw/book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
export lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
export lang
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/reader/$ENV{"lang"}/$2!gm' $line
perl -i -pe 's!(\().*?(abb)!$1/static/reader/$ENV{"lang"}/$2!gm' "$line"
fi
done
)
- |
(
set -x
cd ./_raw/book;
if [ -f book.json ]; then
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment