aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-15 15:11:52 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-15 15:11:52 +0000
commita0ab37f719ce5ab953aae7e218b4d3661ae18818 (patch)
tree01cf8e29eb2c6108ab748d16edaf4392451b8993 /kiss
parentd3aff78e9c7a30750284ea54816052f570c9ae6a (diff)
downloadcpt-a0ab37f719ce5ab953aae7e218b4d3661ae18818.tar.gz
kiss: add prompt after kiss build to install
FossilOrigin-Name: 4272813157bbe44417914b1675e6b422bc975ea3f0e40ab378f1031d5ccc27fb
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss21
1 files changed, 19 insertions, 2 deletions
diff --git a/kiss b/kiss
index 89bf460..d00ec0a 100755
--- a/kiss
+++ b/kiss
@@ -505,7 +505,24 @@ pkg_build() {
done
log "Successfully built package(s)."
- log "Run 'kiss i${explicit_packages% }' to install the built package(s)."
+
+ # Turn the explicit packages into a 'list'.
+ set -- $explicit_packages
+
+ # Only ask for confirmation if more than one package needs to be installed.
+ [ $# -gt 1 ] && {
+ log "Install built packages? [$*]" \
+ "Press Enter to continue or Ctrl+C to abort here."
+
+ # POSIX 'read' has none of the "nice" options like '-n', '-p'
+ # etc etc. This is the most basic usage of 'read'.
+ read -r REPLY && {
+ args i "$@"
+ return
+ }
+ }
+
+ log "Run 'kiss i $*' to install the built package(s)."
}
pkg_checksums() {
@@ -828,7 +845,7 @@ pkg_updates() {
# Turn the string of outdated packages into a 'list'.
set -- $outdated
- log "Packages to update: ${outdated% }."
+ log "Packages to update: $*."
# Tell 'pkg_build' to always prompt before build.
build_prompt=1