aboutsummaryrefslogtreecommitdiff
path: root/update.bash
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 20:50:20 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 20:50:20 +0200
commitcf41d66d911beaf3c65906c9d40a95f38bcbd681 (patch)
tree1a4e223925110b91a7a3abcd47a61c686337ae3a /update.bash
parent4c3e069581b71b5a50a997f932936628f3729b9d (diff)
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.
Diffstat (limited to 'update.bash')
-rwxr-xr-xupdate.bash9
1 files changed, 7 insertions, 2 deletions
diff --git a/update.bash b/update.bash
index 208d7f2..118aeb1 100755
--- a/update.bash
+++ b/update.bash
@@ -105,7 +105,12 @@ function update
replace '_pkgver' 'pkgver'
fi
- replace_line '%PREPARE%' "${prepare[${lang}${ext}]}" rm-plus-one
+ local rstring_base="${prepare[${lang}${ext}]}"
+ local rstring
+ rstring=$'\n'"$(sed -E 's/^/\t/' <<< "$rstring_base")"$'\n'
+ replace_line '%PREPARE_CONTENT%' "${rstring_base:+${rstring}}"
+ rstring=$'prepare()\n{'"$rstring"$'}\n'
+ replace_line '%PREPARE%' "${rstring_base:+${rstring}}" rm-plus-one
write PKGBUILD
makepkg --printsrcinfo > .SRCINFO
@@ -188,7 +193,7 @@ function handle_all_vcs
for lang in "${vcs_langs[@]}"
do
- cd $lang || exit 1
+ cd "$lang" || exit 1
$nopull || git pull -q
pkgver="$(sed -En 's/\s*pkgver\s*=\s*(.+)\s*/\1/p' .SRCINFO)"
makepkg --nobuild --nodeps > /dev/null 2>&1