From dd825b0a1494a7a1e085226cdda0567d5191b5b7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 12 May 2020 11:49:27 +0300 Subject: [PATCH] kiss: Added ability to disable prompts --- kiss | 2 +- kiss.1 | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kiss b/kiss index 7b70d70..b9d9c0a 100755 --- a/kiss +++ b/kiss @@ -45,7 +45,7 @@ prompt() { # POSIX 'read' has none of the "nice" options like '-n', '-p' # etc etc. This is the most basic usage of 'read'. # '_' is used as 'dash' errors when no variable is given to 'read'. - read -r _ + [ "$KISS_NOPROMPT" = 1 ] || read -r _ } as_root() { diff --git a/kiss.1 b/kiss.1 index 36725e6..b80d883 100644 --- a/kiss.1 +++ b/kiss.1 @@ -61,7 +61,7 @@ export KISS_FORCE=0 # The script will have the following environment variables set. # # $PKG: Name of the current package . -# $TYPE: The type of hook (valid: pre-build, post-build, build-fail, +# $TYPE: The type of hook (valid: pre-build, post-build, build-fail, # pre-install, post-install). # $DEST: The full path to where 'make install' will put the package. # @@ -99,6 +99,12 @@ export KISS_ROOT=/ # Set it to '1' to enable. export KISS_KEEPLOG=0 +# Automatically say 'yes' to all prompts in the package manager. +# This is handy for scripting purposes. +# +# Set it to '1' to enable. +export KISS_NOPROMPT=0 + # Compression method to use for package tarballs. # # Valid options: 'bz2', 'gz' (default), 'lzma', 'lz', 'xz', 'zst'