1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 08:30:05 -07:00

kiss: Final clean up of pkg_checksums()

This commit is contained in:
Dylan Araps 2020-05-22 13:42:30 +03:00
parent e7eb498d34
commit 9f162fd4d0
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

30
kiss
View File

@ -718,25 +718,23 @@ pkg_checksums() {
# Support packages without sources. Simply do nothing. # Support packages without sources. Simply do nothing.
[ -f "$repo_dir/sources" ] || return 0 [ -f "$repo_dir/sources" ] || return 0
while read -r src _ || [ "$src" ]; do while read -r src _ || [ "$src" ]; do case $src in \#*) ;;
case $src in \#*) ;; git+*) printf 'git %s\n' "$src" ;;
git+*) printf 'git %s\n' "$src" ;;
*) *)
# File is local to the package. # File is local to the package.
if [ -f "$repo_dir/$src" ]; then if [ -f "$repo_dir/$src" ]; then
cd "$repo_dir/${src%/*}" cd "$repo_dir/${src%/*}"
# File is remote and was downloaded. # File is remote and was downloaded.
elif [ -f "$src_dir/$1/${src##*/}" ]; then elif [ -f "$src_dir/$1/${src##*/}" ]; then
cd "$src_dir/$1" cd "$src_dir/$1"
fi fi
sh256 "${src##*/}" || sh256 "${src##*/}" ||
die "$1" "Failed to generate checksums" die "$1" "Failed to generate checksums"
;; ;;
esac esac; done < "$repo_dir/sources"
done < "$repo_dir/sources"
} }
pkg_verify() { pkg_verify() {