From 41aca51f2edb473750601012b67f1734d938b2f3 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 25 Mar 2019 14:28:01 +0100 Subject: update-archlinux32-package: correctly handle multiple multi-line checksums --- update-archlinux32-package | 14 ++++++++++++-- 1 file 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" \ -- cgit v1.2.3