Commit d4627112 authored by Timo Teräs's avatar Timo Teräs Committed by Natanael Copa

abuild: verify: only check strongest checksum which is present

parent b48df6c5
......@@ -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)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment