aboutsummaryrefslogtreecommitdiff
path: root/config.default.sh
blob: 276f912152fd1c528762e560f1d6b1f33f18f39e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
#
# Copyright 2018 Einhard Leichtfuß
#
# config.default.sh - default configuration options;
#                     copy this file to config.sh and modify to your liking.
#
# This file is part of aur-fd-scripts
#
# aur-fd-scripts is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# aur-fd-scripts is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with aur-fd-scripts.  If not, see <https://www.gnu.org/licenses/>.
#


# 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
}
'