summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-14 15:19:02 +0100
committerdavidovski <david@davidovski.xyz>2022-05-14 15:19:02 +0100
commit1b9c4d1986c7596fa1d6e4767ef0326b67b02c8b (patch)
tree69c0608b8570899933142bcb3ffc6c47a8742639
parent7b95d9724b5ae58a052e3df898a5a81c4271cac8 (diff)
added backwards compat for md5sum
-rw-r--r--src/validate.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/validate.sh b/src/validate.sh
index b87e7ca..7087fba 100644
--- a/src/validate.sh
+++ b/src/validate.sh
@@ -4,7 +4,10 @@ validate_checksum () {
local file=$1
local checksum=$2
[ ! -f $file ] && return 1
- [ "$(sha512sum $file | awk '{ print $1; }')" = "$checksum" ]
+ [ "$(sha512sum $file | awk '{ print $1; }')" = "$checksum" ] ||
+ [ "$(md5sum $file | awk '{ print $1; }')" = "$checksum" ]
+ # allow md5sum for backwards compatibility
+ # TODO remove once all repos have sha512 sums
}
validate_sig () {