From cf41d66d911beaf3c65906c9d40a95f38bcbd681 Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Fri, 29 Apr 2022 20:50:20 +0200 Subject: 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. --- general-config.bash | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'general-config.bash') 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 -- cgit v1.2.3