kiss: clean up

This commit is contained in:
Dylan Araps 2020-03-21 13:54:48 +02:00
parent 625d5f6855
commit c570d24086
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

40
kiss
View File

@ -553,20 +553,15 @@ pkg_build() {
# Install any pre-built dependencies if they exist in the binary # Install any pre-built dependencies if they exist in the binary
# directory and are up to date. # directory and are up to date.
for pkg do for pkg do ! contains "$explicit_build" "$pkg" && pkg_cache "$pkg" && {
# Don't check for a pre-built package if it was passed log "$pkg" "Found pre-built binary, installing"
# to KISS directly and install any pre-built binaries if (KISS_FORCE=1 args i "$tar_file")
# they exist.
! contains "$explicit_build" "$pkg" && pkg_cache "$pkg" && {
log "$pkg" "Found pre-built binary, installing"
(KISS_FORCE=1 args i "$tar_file")
# Remove the now installed package from the build list. # Remove the now installed package from the build list.
# See [1] at top of script. # See [1] at top of script.
# shellcheck disable=2046,2086 # shellcheck disable=2046,2086
set -- $(pop "$pkg" "$@") set -- $(pop "$pkg" "$@")
} } done
done
for pkg do pkg_sources "$pkg"; done for pkg do pkg_sources "$pkg"; done
@ -700,16 +695,14 @@ pkg_verify() {
# Verify all package checksums. This is achieved by generating # Verify all package checksums. This is achieved by generating
# a new set of checksums and then comparing those with the old # a new set of checksums and then comparing those with the old
# set. # set.
for pkg do for pkg do pkg_checksums "$pkg" | cmp - "$(pkg_find "$pkg")/checksums" || {
pkg_checksums "$pkg" | cmp -s - "$(pkg_find "$pkg")/checksums" || { log "$pkg" "Checksum mismatch"
log "$pkg" "Checksum mismatch"
# Instead of dying above, log it to the terminal. Also define a # Instead of dying above, log it to the terminal. Also define a
# variable so we *can* die after all checksum files have been # variable so we *can* die after all checksum files have been
# checked. # checked.
mismatch="$mismatch$pkg " mismatch="$mismatch$pkg "
} } done
done
[ -z "$mismatch" ] || die "Checksum mismatch with: ${mismatch% }" [ -z "$mismatch" ] || die "Checksum mismatch with: ${mismatch% }"
} }
@ -1121,8 +1114,7 @@ pkg_updates() {
case $su in case $su in
su) "$su" -c "git fetch && git merge" "$user" ;; su) "$su" -c "git fetch && git merge" "$user" ;;
*) "$su" -u "$user" git fetch
*) "$su" -u "$user" git fetch
"$su" -u "$user" git merge "$su" -u "$user" git merge
esac esac
) )