From 722ef957d6bf145a79974eed922e1b6044f24398 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 24 Aug 2019 09:10:15 +0000 Subject: [PATCH 1/2] kiss: install on update, closes #43 --- kiss | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/kiss b/kiss index e2cccc4..755f937 100755 --- a/kiss +++ b/kiss @@ -453,7 +453,7 @@ pkg_build() { log "Building: $*" # Only ask for confirmation if more than one package needs to be built. - [ $# -gt 1 ] || [ "$build_prompt" ] && { + [ $# -gt 1 ] || [ "$pkg_update" ] && { log "Continue?: Press Enter to continue or Ctrl+C to abort here" # POSIX 'read' has none of the "nice" options like '-n', '-p' @@ -566,14 +566,13 @@ pkg_build() { pkg_tar "$pkg" # Install only dependencies of passed packages. + # Skip this check if this is a package update. case $explicit_packages in - *" $pkg "*) continue ;; - - *) - log "[$pkg] Needed as a dependency, installing" - args i "$pkg" - ;; + *" $pkg "*) [ "$pkg_update" ] || continue ;; esac + + log "[$pkg] Needed as a dependency or has an update, installing" + args i "$pkg" done log "Successfully built package(s)" @@ -937,7 +936,7 @@ pkg_updates() { log "Packages to update: $*" # Tell 'pkg_build' to always prompt before build. - build_prompt=1 + pkg_update=1 # Build all packages requiring an update. pkg_build "$@" From 3629136092f403e455f17e29660296eb7f1ffcb9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 24 Aug 2019 09:18:08 +0000 Subject: [PATCH 2/2] kiss: fix build exit --- kiss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kiss b/kiss index 755f937..5ccadfc 100755 --- a/kiss +++ b/kiss @@ -575,6 +575,9 @@ pkg_build() { args i "$pkg" done + # End here as this was a system update and all packages have been installed. + [ "$pkg_update" ] && return + log "Successfully built package(s)" # Turn the explicit packages into a 'list'. @@ -940,6 +943,7 @@ pkg_updates() { # Build all packages requiring an update. pkg_build "$@" + log "Updated all packages" } pkg_clean() {