summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-07-19 13:39:24 +0300
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-19 11:43:24 +0000
commitd4627112a910e2dfab045e3c95b31cd2d554cad0 (patch)
treefa149be484dc3639665f1c065b1d763b185d64da /abuild.in
parentb48df6c57519a333ba7d79b0cfa86541222c1913 (diff)
downloadabuild-d4627112a910e2dfab045e3c95b31cd2d554cad0.tar.gz
abuild-d4627112a910e2dfab045e3c95b31cd2d554cad0.tar.bz2
abuild-d4627112a910e2dfab045e3c95b31cd2d554cad0.tar.xz
abuild-d4627112a910e2dfab045e3c95b31cd2d554cad0.zip
abuild: verify: only check strongest checksum which is present
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index ebf8a00..d3a4c87 100755
--- a/abuild.in
+++ b/abuild.in
@@ -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)"