summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-11 16:04:56 +0100
committerdavidovski <david@davidovski.xyz>2022-05-11 16:04:56 +0100
commit5e693dd31a8e1e876e8a2ed6e941724442f7999e (patch)
tree6cb18992c049648f4cccf84ec47e816adcfed53a
parent8758658db49688b7cc7b55603db1b8438775ccc4 (diff)
switched to using sha512 instead of md5 sum
-rw-r--r--src/install.sh2
-rw-r--r--src/validate.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/install.sh b/src/install.sh
index 1b7fe9a..f2f1a8c 100644
--- a/src/install.sh
+++ b/src/install.sh
@@ -14,7 +14,7 @@ install_package () {
local files="$installed_dir/files"
local checksum="$installed_dir/checksum"
- set -- $(md5sum $pkg_file)
+ set -- $(sha512sum $pkg_file)
local package_checksum=$1
if [ ! -f $checksum ] || [ "$(cat $checksum)" != "$package_checksum" ]; then
diff --git a/src/validate.sh b/src/validate.sh
index 0c9dd2d..b87e7ca 100644
--- a/src/validate.sh
+++ b/src/validate.sh
@@ -4,7 +4,7 @@ validate_checksum () {
local file=$1
local checksum=$2
[ ! -f $file ] && return 1
- [ "$(md5sum $file | awk '{ print $1; }')" = "$checksum" ]
+ [ "$(sha512sum $file | awk '{ print $1; }')" = "$checksum" ]
}
validate_sig () {