abuild: verify: only check strongest checksum which is present

This commit is contained in:
Timo Teräs 2013-07-19 13:39:24 +03:00 committed by Natanael Copa
parent b48df6c575
commit d4627112a9
1 changed files with 2 additions and 1 deletions

View File

@ -299,7 +299,7 @@ md5check() {
# verify checksums
verify() {
local verified=false algo=
for algo in md5 sha1 sha256 sha512; do
for algo in sha512 sha256 sha1 md5; do
local sums=
eval sums=\"\$${algo}sums\"
if [ -z "$sums" ] || [ -z "$source" ]; then
@ -307,6 +307,7 @@ verify() {
fi
sumcheck "$algo" "$sums" || return 1
verified=true
break
done
if [ -n "$source" ] && ! $verified; then
die "Use 'abuild checksum' to generate/update the checksum(s)"