1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 00:20:05 -07:00
Dylan Araps 2021-06-29 15:18:53 +00:00
parent 0a9a1f2f54
commit a636173f47

12
kiss
View File

@ -760,22 +760,16 @@ pkg_checksums() {
# Generate checksums for packages.
repo_dir=$(pkg_find "$1")
# Support packages without sources. Simply do nothing.
[ -f "$repo_dir/sources" ] || return 0
while read -r src dest || [ "$src" ]; do
# Skip comments, blank lines and git sources.
if [ -z "${src##\#*}" ] || [ -z "${src##git+*}" ]; then
# Skip directories, comments, blank lines and git sources.
if [ -z "${src##\#*}" ] || [ -z "${src##git+*}" ] ||
[ -d "$repo_dir/$src" ] || [ -d "/$src" ]; then
:
# Remote source.
elif [ -z "${src##*://*}" ]; then
sh256 "$src_dir/$1/${dest:-.}/${src##*/}"
# Skip directories.
elif [ -d "$repo_dir/$src" ] || [ -d "/$src" ]; then
:
# Local file (relative).
elif [ -f "$repo_dir/$src" ]; then
sh256 "$repo_dir/$src"