diff options
author | merakor <cem@ckyln.com> | 2020-03-22 16:31:14 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-03-22 16:31:14 +0000 |
commit | a0943d7f99ba79757a74f300bbd538e50da20c5c (patch) | |
tree | 23fd89a9cc09acc3083b16ac7f2c257830725c1f | |
parent | cdd028c2dc334c931b5d76046509c7bbe3ae0645 (diff) | |
download | cpt-a0943d7f99ba79757a74f300bbd538e50da20c5c.tar.gz |
kiss: clean up
FossilOrigin-Name: 6e8c2301193dda6f3c54e6c757e3b01799030dc96b4f19e0a89fc67ddda5b04a
-rwxr-xr-x | kiss | 42 |
1 files changed, 17 insertions, 25 deletions
@@ -556,20 +556,15 @@ pkg_build() { # Install any pre-built dependencies if they exist in the binary # directory and are up to date. - for pkg do - # Don't check for a pre-built package if it was passed - # to KISS directly and install any pre-built binaries if - # 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. - # See [1] at top of script. - # shellcheck disable=2046,2086 - set -- $(pop "$pkg" "$@") - } - done + for pkg do ! 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. + # See [1] at top of script. + # shellcheck disable=2046,2086 + set -- $(pop "$pkg" "$@") + } done for pkg do pkg_sources "$pkg"; done @@ -703,16 +698,14 @@ pkg_verify() { # Verify all package checksums. This is achieved by generating # a new set of checksums and then comparing those with the old # set. - for pkg do - pkg_checksums "$pkg" | cmp -s - "$(pkg_find "$pkg")/checksums" || { - log "$pkg" "Checksum mismatch" + for pkg do pkg_checksums "$pkg" | cmp - "$(pkg_find "$pkg")/checksums" || { + log "$pkg" "Checksum mismatch" - # Instead of dying above, log it to the terminal. Also define a - # variable so we *can* die after all checksum files have been - # checked. - mismatch="$mismatch$pkg " - } - done + # Instead of dying above, log it to the terminal. Also define a + # variable so we *can* die after all checksum files have been + # checked. + mismatch="$mismatch$pkg " + } done [ -z "$mismatch" ] || die "Checksum mismatch with: ${mismatch% }" } @@ -1121,8 +1114,7 @@ pkg_fetch() { case $su in su) "$su" -c "git fetch && git merge" "$user" ;; - - *) "$su" -u "$user" git fetch + *) "$su" -u "$user" git fetch "$su" -u "$user" git merge esac ) |