aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoreply@github.com <noreply@github.com>2019-08-25 05:19:40 +0000
committernoreply@github.com <noreply@github.com>2019-08-25 05:19:40 +0000
commit358826b6ce6365542901663008ac83c2f7560b5f (patch)
tree3d46e895905f1ce259ca7d22039986609d779093
parent7beb5235ab6f2e7d5f1fbb4456d692aefc09781f (diff)
parent3c546af6e189f123819c4befd202e588a0a1940a (diff)
downloadcpt-358826b6ce6365542901663008ac83c2f7560b5f.tar.gz
Merge pull request #44 from kisslinux/pkg_update
kiss: install on update, closes #43 FossilOrigin-Name: c21abe59409dac225c5fa52803ef436a03e692d6982b073069cf6abf31786772
-rwxr-xr-xkiss19
1 files changed, 11 insertions, 8 deletions
diff --git a/kiss b/kiss
index e2cccc4..5ccadfc 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,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() {