cpt

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

commit 7216124e900099b217b63da6b9f1d7ddabcb1067
parent d5f609e761c3adcc0a81880737827b91cd5f4555
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Thu, 20 Feb 2020 00:39:21 +0200

kiss: Print messages from prompt().

This enables the removal of a mess of nested
braces. I'm happy now.

Diffstat:
Mkiss | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/kiss b/kiss @@ -41,6 +41,7 @@ contains() { prompt() { # Ask the user for some input. + [ "$1" ] && log "$1" log "Continue?: Press Enter to continue or Ctrl+C to abort here" # POSIX 'read' has none of the "nice" options like '-n', '-p' @@ -643,13 +644,9 @@ pkg_build() { set -- $explicit # Only ask for confirmation if more than one package needs to be installed. - [ $# -gt 1 ] && { - log "Install built packages? [$*]" - - prompt && { - args i "$@" - return - } + [ $# -gt 1 ] && prompt "Install built packages? [$*]" && { + args i "$@" + return } log "Run 'kiss i $*' to install the package(s)"