cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 4eb33e424a33e911f61db0ad891f9bb2909a166b
parent 5615327467aee4f88b51ce5db5896f770c818584
Author: black <dylan.araps@gmail.com>
Date:   Sun, 25 Aug 2019 05:19:40 +0000

Merge pull request #44 from kisslinux/pkg_update

kiss: install on update, closes #43
Diffstat:
Mkiss | 19+++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git 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,16 +566,18 @@ 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 + # 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'. @@ -937,10 +939,11 @@ 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 "$@" + log "Updated all packages" } pkg_clean() {