aboutsummaryrefslogtreecommitdiff
path: root/general-config.bash
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 20:50:20 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 20:50:20 +0200
commitcf41d66d911beaf3c65906c9d40a95f38bcbd681 (patch)
tree1a4e223925110b91a7a3abcd47a61c686337ae3a /general-config.bash
parent4c3e069581b71b5a50a997f932936628f3729b9d (diff)
Fix svn PKGBUILD: move sources to $_lang
This required allowing a fixed prepare() function and, for the optional, dictionary-specific prepare() part to be inserted into such a fixed prepare() function.
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