diff options
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -33,6 +33,7 @@ script_path="$(realpath "$0")" script_dir="${script_path%/*}" +. "${script_dir}/basic.sh" ## Some configuration. @@ -44,7 +45,7 @@ long[deu]=German long[eng]=English long[spa]=Spanish -# Contributors for some specific PKGBUILDs. +# 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' @@ -55,8 +56,22 @@ contrs[fra-eng-bin]=\ contrs[eng-fra-bin]=\ '# Contributor: Benjamin Vanderford <hazor_at_swrpg_dot_info>'$'\n' -# prepare() functions. +# 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() { @@ -72,10 +87,6 @@ prepare[deu-fra]=\ ## End configuration - -. "${script_dir}/basic.sh" - - function main { if [ "$#" -lt 2 ] @@ -133,6 +144,7 @@ function update replace '%LANG_A%' "$lang_a" replace '%LANG_B%' "$lang_b" replace '%VER%' "$convver" + replace '%LICENSES%' "${licenses[$lang]}" replace '%CHECKSUM%' "$checksum" replace_line '%CONTRS%' "${contrs[${lang}${ext}]}" normal |