pkg_verify: simplify

This commit is contained in:
Dylan Araps 2021-08-30 17:51:54 +03:00
parent 98097feec5
commit 7a53298241
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 3 additions and 9 deletions

12
kiss
View File

@ -1080,15 +1080,9 @@ pkg_verify() {
null "$1" || while read -r chk _ || ok "$1"; do null "$1" || while read -r chk _ || ok "$1"; do
printf '%s\n%s\n' "- ${chk:-missing}" "+ ${1:-no source}" printf '%s\n%s\n' "- ${chk:-missing}" "+ ${1:-no source}"
case $1-${chk:-null} in equ "$1-${chk:-null}" "$chk-$1" ||
"$chk-$1"|"$1-SKIP") equ "$1-${chk:-null}" "$1-SKIP" ||
# We have a match. die "$repo_name" "Checksum mismatch"
;;
"$hash"-*|*)
die "$repo_name" "Checksum mismatch"
;;
esac
shift "$(($# != 0))" shift "$(($# != 0))"
done < "$repo_dir/checksums" done < "$repo_dir/checksums"