From 36ee91c0aeea24d8d0eeebfc59dc6fecb7e998dc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 19 Jul 2021 00:11:29 +0300 Subject: [PATCH] kiss: minor fixes --- kiss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index 3de52b3..4af7d77 100755 --- a/kiss +++ b/kiss @@ -191,6 +191,11 @@ sh256() { [ -d "$f" ] || [ ! -e "$f" ] || set -- "$@" "$f" done + # Nothing to do. + case $# in 0) + return + esac + # Set the arguments based on found sha256 utility. case ${cmd_sha##*/} in openssl) set -- dgst -sha256 -r "$@" ;; @@ -974,12 +979,12 @@ pkg_checksums() { while read -r src dest || [ "$src" ]; do pkg_source_resolve "$repo_name" "$src" "$dest" >/dev/null - case $_res in */*[!.]) + case $_res in git+*) ;; */*[!.]) set -- "$@" "$_res" esac done < "$repo_dir/sources" - null "$1" || sh256 "$@" + sh256 "$@" } pkg_verify() { @@ -997,7 +1002,7 @@ pkg_verify() { set -- $hash # Only read checksums if we generated some. - ! [ "$1" ] || + null "$1" || # Check that the first column (separated by whitespace) match in both # checksum files. If any part of either file differs, mismatch. Abort.