aboutsummaryrefslogtreecommitdiff
path: root/config.default.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config.default.sh')
-rwxr-xr-xconfig.default.sh75
1 files changed, 75 insertions, 0 deletions
diff --git a/config.default.sh b/config.default.sh
new file mode 100755
index 0000000..d17b4c1
--- /dev/null
+++ b/config.default.sh
@@ -0,0 +1,75 @@
+#!/usr/bin/env bash
+#
+# config.default.sh - some configuration options.
+#
+# Move this file to config.sh and modify to your liking.
+#
+
+# The maintainer to be listed in the PKGBUILD.
+maintainer="Your Name <your@email-address.tld>"
+
+
+# Dictionaries in the VCS tree, GPL2 assumed.
+typeset -a vcs_langs
+vcs_langs=(
+ deu-eng eng-deu
+ fra-eng eng-fra
+ spa-eng eng-spa
+ )
+
+typeset -a wikdict_langs
+wikdict_langs=(
+ fra-deu deu-fra
+ )
+
+typeset -a langs
+langs=( ${vcs_langs[@]} ${wikdict_langs[@]} )
+
+
+# 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
+}
+'