kiss: remove now pointless case

This commit is contained in:
Dylan Araps 2019-09-11 10:03:35 +03:00
parent 72e67ef547
commit 32c1a848cb

32
kiss
View File

@ -510,27 +510,23 @@ pkg_checksums() {
repo_dir=$(pkg_find "$1") repo_dir=$(pkg_find "$1")
while read -r src _; do while read -r src _; do
case $src in # File is local to the package.
*) if [ -f "$repo_dir/$src" ]; then
# File is local to the package. src_path=$repo_dir/${src%/*}
if [ -f "$repo_dir/$src" ]; then
src_path=$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
src_path=$src_dir/$1 src_path=$src_dir/$1
# Die here if source for some reason, doesn't exist. # Die here if source for some reason, doesn't exist.
else else
die "[$1] Couldn't find source '$src'" die "[$1] Couldn't find source '$src'"
fi fi
# An easy way to get 'sha256sum' to print with the 'basename' # An easy way to get 'sha256sum' to print with the 'basename'
# of files is to 'cd' to the file's directory beforehand. # of files is to 'cd' to the file's directory beforehand.
(cd "$src_path" && sha256sum "${src##*/}") || (cd "$src_path" && sha256sum "${src##*/}") ||
die "[$1] Failed to generate checksums" die "[$1] Failed to generate checksums"
;;
esac
done < "$repo_dir/sources" done < "$repo_dir/sources"
} }