diff options
author | Erich Eckner <git@eckner.net> | 2019-03-25 14:28:01 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-03-25 14:28:01 +0100 |
commit | 41aca51f2edb473750601012b67f1734d938b2f3 (patch) | |
tree | 0a3ac7da0fe304b2b4b050acc0d044696c670600 | |
parent | 750f7e19271cfc1bbf2051982b73da0384ec84c2 (diff) | |
download | devops-41aca51f2edb473750601012b67f1734d938b2f3.tar.xz |
update-archlinux32-package: correctly handle multiple multi-line checksums
-rwxr-xr-x | update-archlinux32-package | 14 |
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" \ |