aboutsummaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 17:59:31 +0100
committerEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 18:02:41 +0100
commit578c30417de768429e7a75eb8d30c5982043d3b0 (patch)
treef94b12f063af28ac2f8119e54cb5f32281232fa1 /update.sh
parent53fc988c4110e5a809d5780483c6a072c2dfae4e (diff)
Split off config.sh and add maintainer variable
Now, other people than myself might be maintainer. Also, add `| exit 1' to the sourcing of scripts. Furthermore, add note to the scripts in the sample.* files.
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh54
1 files changed, 2 insertions, 52 deletions
diff --git a/update.sh b/update.sh
index d58f45b..a032671 100755
--- a/update.sh
+++ b/update.sh
@@ -33,58 +33,7 @@
script_path="$(realpath "$0")"
script_dir="${script_path%/*}"
-. "${script_dir}/basic.sh"
-
-
-## Some configuration.
-
-# Long names table.
-typeset -A long
-long[fra]=French
-long[deu]=German
-long[eng]=English
-long[spa]=Spanish
-
-# Contributors for some specific PKGBUILDs (indexed by $lang$ext).
-typeset -A contrs
-contrs[deu-eng-bin]=\
-'# Contributor: akane <grangerspit@gmail.com> <xmpp:heiß@neko.im>'$'\n'
-contrs[eng-deu-bin]=\
-'# Contributor: akane <grangerspit@gmail.com> <xmpp:heiß@neko.im>'$'\n'
-contrs[fra-eng-bin]=\
-'# Contributor: Benjamin Vanderford <hazor_at_swrpg_dot_info>'$'\n'
-contrs[eng-fra-bin]=\
-'# Contributor: Benjamin Vanderford <hazor_at_swrpg_dot_info>'$'\n'
-
-# Licenses (indexed by $lang)
-typeset -A licenses
-for lang in ${vcs_langs[@]}
-do
- licenses[$lang]="'GPL'"
-done
-
-for lang in ${wikdict_langs[@]}
-do
- licenses[$lang]="'CCPL:by-sa' 'FDL'"
-done
-
-# prepare() functions (indexed by $lang$ext).
-typeset -A prepare
-
-# Does not work for deu-fra-bin, since the index file must stay in sync.
-prepare[deu-fra]=\
-'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
-}
-'
-
-## End configuration
+. "${script_dir}/basic.sh" || exit 1
function main
@@ -140,6 +89,7 @@ function update
input "${script_dir}/${type}/sample.PKGBUILD"
+ replace '%MAINTAINER%' "$maintainer"
replace '%LANG%' "$lang"
replace '%LANG_A%' "$lang_a"
replace '%LANG_B%' "$lang_b"