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
1 changed files with 5 additions and 4 deletions

9
kiss
View File

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