aboutsummaryrefslogtreecommitdiff
path: root/update.bash
diff options
context:
space:
mode:
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