Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/update-archlinux32-package
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-03-25 14:28:01 +0100
committerErich Eckner <git@eckner.net>2019-03-25 14:28:01 +0100
commit41aca51f2edb473750601012b67f1734d938b2f3 (patch)
tree0a3ac7da0fe304b2b4b050acc0d044696c670600 /update-archlinux32-package
parent750f7e19271cfc1bbf2051982b73da0384ec84c2 (diff)
update-archlinux32-package: correctly handle multiple multi-line checksums
Diffstat (limited to 'update-archlinux32-package')
-rwxr-xr-xupdate-archlinux32-package14
1 files changed, 12 insertions, 2 deletions
diff --git a/update-archlinux32-package b/update-archlinux32-package
index e27a909..ceb6e41 100755
--- a/update-archlinux32-package
+++ b/update-archlinux32-package
@@ -92,7 +92,7 @@ case "${pkgname}" in
# upstream, though)
update_path='archlinuxewe'
;;
- 'archiso'|'eclipse'|'flashplugin'|'freebasic')
+ 'archiso'|'eclipse'|'flashplugin'|'freebasic'|'reflector')
# an upstream package which is updated by solely updating its checksum
update_path='checksum'
;;
@@ -217,7 +217,7 @@ case ${update_path} in
' < "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
| sed -n "$(
sed '
- s,^\([^[:space:]=]\+sums\(_[^[:space:]=]\+\)\?=\).*$,/^\1/ p,
+ s,^\([^[:space:]=]\+sums\(_[^[:space:]=]\+\)\?=\).*$,/^\1/ { :a; $be; N; /(.*)/ { p; d; }; :e; p },
t
d
' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
@@ -234,6 +234,16 @@ case ${update_path} in
$b
N
s/^\S\+sums[^=]*=(.*)/'"${sums}"'/
+ tb
+ :b
+ p
+ :c
+ s/\(^\|\n\)\S\+sums[^=]*=([^()]*)\($\|\n\)/\1\2/
+ s/\n\n\+/\n/g
+ $! {
+ N
+ bc
+ }
}
' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
if ! cat "${used_upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}/PKGBUILD" "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \