aboutsummaryrefslogtreecommitdiff
path: root/general-config.bash
diff options
context:
space:
mode:
Diffstat (limited to 'general-config.bash')
-rw-r--r--general-config.bash19
1 files changed, 9 insertions, 10 deletions
diff --git a/general-config.bash b/general-config.bash
index 2c0cd6a..d3a8368 100644
--- a/general-config.bash
+++ b/general-config.bash
@@ -72,18 +72,17 @@ do
done
-# prepare() functions (indexed by $lang$ext).
+# Optional prepare() function contents (indexed by $lang$ext).
+# - Not necessarily the full function body, but possibly only a part of it.
+# - We cannot assume to be in ${srcdir}.
typeset -A prepare
# Does not work for deu-fra-bin, since the index file must stay in sync.
read -r -d '' prepare[deu-fra] << 'EOF' ||:
-prepare()
-{
- cd "$_lang"
- sed -Ei \
- -e 's/(10)(10)(100\>)(\s+\(10)(Googol.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4^\5/' \
- -e 's/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/' \
- -e 's/(die Zahl 10)(60)/\1^\2/' \
- "${_lang}.tei"
-}
+cd "${srcdir}${_lang}"
+sed -Ei \
+ -e 's/(10)(10)(100\>)(\s+\(10)(Googol.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4^\5/' \
+ -e 's/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/' \
+ -e 's/(die Zahl 10)(60)/\1^\2/' \
+ "${_lang}.tei"
EOF