kiss: fix package manager not cleating hash. Closes #248

This commit is contained in:
Dylan Araps 2021-07-24 20:52:30 +03:00
parent 5f4b22bdae
commit c423b67e65
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

9
kiss
View File

@ -200,8 +200,7 @@ sh256() {
[ -d "$f" ] || [ ! -e "$f" ] || set -- "$@" "$f" [ -d "$f" ] || [ ! -e "$f" ] || set -- "$@" "$f"
done done
# Only call _sh256 if we have files to operate on. _sh256 "$@"
for f do _sh256 "$@"; return 0; done
} }
_sh256() { _sh256() {
@ -214,6 +213,9 @@ _sh256() {
# Example: '<checksum> <file>' # Example: '<checksum> <file>'
unset hash unset hash
# Skip generation if no arguments.
! equ "$#" 0 || return 0
# Set the arguments based on found sha256 utility. # Set the arguments based on found sha256 utility.
case ${cmd_sha##*/} in case ${cmd_sha##*/} in
openssl) set -- dgst -sha256 -r "$@" ;; openssl) set -- dgst -sha256 -r "$@" ;;
@ -1022,8 +1024,7 @@ pkg_checksums() {
esac esac
done < "$repo_dir/sources" done < "$repo_dir/sources"
# Only run _sh256 if we have elements. _sh256 "$@"
for f do _sh256 "$@"; return 0; done
} }
pkg_verify() { pkg_verify() {