From 40334e3c8f924c8fb846be1412523d526bb112d6 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 28 Jul 2018 19:07:12 +0200 Subject: core/pacman: make checksum-corrections index-independent --- core/pacman/PKGBUILD | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/pacman/PKGBUILD b/core/pacman/PKGBUILD index e2762d50..ed748bb4 100644 --- a/core/pacman/PKGBUILD +++ b/core/pacman/PKGBUILD @@ -3,9 +3,11 @@ depends+=(archlinux32-keyring) # fail if upstream changes makepkg.conf or pacman.conf -if [ "${sha256sums[4]}" = 'b82e9c1073292766c2f49b5c771dddf37383f1151117ef9cd5e0c11047b4f3eb' ]; then - sha256sums[4]='d75bbbe42d290c4f22a95e6ac86d4723dc6d0c08228d14c3dcbae9dc5d2514e5' -fi -if [ "${sha256sums[5]}" = '650ddad24cad6afc4aecb4829cb8f06b9acb70c10a44f756fe8bd279949b518e' ]; then - sha256sums[5]='d1c3e5f9b7259e401ab121aff335531452d23dc67d9e6c2f464771d25f11058a' -fi +for ((i=0; i<${#sha256sums[@]}; i++)); do + if [ "${sha256sums[${i}]}" = 'b82e9c1073292766c2f49b5c771dddf37383f1151117ef9cd5e0c11047b4f3eb' ]; then + sha256sums[${i}]='d75bbbe42d290c4f22a95e6ac86d4723dc6d0c08228d14c3dcbae9dc5d2514e5' + fi + if [ "${sha256sums[${i}]}" = '650ddad24cad6afc4aecb4829cb8f06b9acb70c10a44f756fe8bd279949b518e' ]; then + sha256sums[${i}]='d1c3e5f9b7259e401ab121aff335531452d23dc67d9e6c2f464771d25f11058a' + fi +done -- cgit v1.2.3-70-g09d2