From 7ff1f590940cd13afd01662ac1b4b083762f73ba Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Sat, 24 Aug 2019 09:10:15 +0000 Subject: kiss: install on update, closes #43 FossilOrigin-Name: 728d676450f8298a3b9e0cac9024f57824410616f97ef15bf9ee1bec9a36566b --- 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 "$@" -- cgit v1.2.3 From 3c546af6e189f123819c4befd202e588a0a1940a Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Sat, 24 Aug 2019 09:18:08 +0000 Subject: kiss: fix build exit FossilOrigin-Name: 35c67c7a7a27ab1b2fe5cca2731d7b387b74d0c2a2edef88df8cad6ad67ab51b --- 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() { -- cgit v1.2.3