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
1 changed files with 14 additions and 16 deletions

30
kiss
View File

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