aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-24 09:10:15 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-24 09:10:15 +0000
commit7ff1f590940cd13afd01662ac1b4b083762f73ba (patch)
tree4f79477f3cd3368d4d39bc9590775424dcd2e4ba /kiss
parent7beb5235ab6f2e7d5f1fbb4456d692aefc09781f (diff)
downloadcpt-7ff1f590940cd13afd01662ac1b4b083762f73ba.tar.gz
kiss: install on update, closes #43
FossilOrigin-Name: 728d676450f8298a3b9e0cac9024f57824410616f97ef15bf9ee1bec9a36566b
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss15
1 files 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 "$@"