diff options
author | Mantas Mikulėnas | 2020-11-24 17:01:30 +0200 |
---|---|---|
committer | Mantas Mikulėnas | 2020-11-24 17:01:30 +0200 |
commit | 3b19bafcef9c27aa0afaf83360966e501e59ed64 (patch) | |
tree | 65b4da088e6303fbe72d686d302afeddeab4b9f1 | |
parent | 581cb4bb37b1270e6f956481d410234011bfdeda (diff) | |
download | aur-3b19bafcef9c27aa0afaf83360966e501e59ed64.tar.gz |
slightly improve messages
-rw-r--r-- | PKGBUILD | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -61,6 +61,7 @@ _verify_repo() { local _out _msg "Verifying 'Release' file (PGP)..." + if ! _out=$(gpg --batch --status-fd 1 \ --trust-model always \ --verify "$Release.gpg" "$Release" \ @@ -75,30 +76,34 @@ _verify_repo() { fi _msg "Parsing 'Release' file..." + _out=$(awk 'ok && $3 == "non-free/binary-amd64/Packages" {print $1; exit} /^[^[:space:]]/ {ok=0} /^SHA256:$/ {ok=1}' < "$Release") if ! [[ $_out =~ ^[0-9a-f]{64}$ ]]; then - _err "Could not find hash of 'Packages' in Release file" + _err "Could not find hash of 'non-free/binary-amd64/Packages' in the 'Release' file" return 1 fi _msg "Verifying 'Packages' file (SHA256)..." + if ! sha256sum --quiet --check <<< "$_out *$Packages"; then _err "Hash sum of 'Packages' did not match expected" return 1 fi _msg "Parsing 'Packages' file..." + _out=$(awk 'ok && /^SHA256:/ {print $2; exit} /^Package:/ {ok=0} /^Package: runescape-launcher$/ {ok=1}' < "$Packages") if ! [[ $_out =~ ^[0-9a-f]{64}$ ]]; then - _err "Could not find hash of $debfile in Packages file" + _err "Could not find hash of '$debfile' in the 'Packages' file" return 1 fi _msg "Verifying '$debfile' (SHA256)..." + if ! sha256sum --quiet --check <<< "$_out *$debfile"; then _err "Hash sum of '$debfile' did not match expected" return 1 |