kiss: Added ability to disable prompts

This commit is contained in:
Dylan Araps 2020-05-12 11:49:27 +03:00
parent 66cea7ce2c
commit dd825b0a14
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
2 changed files with 8 additions and 2 deletions

2
kiss
View File

@ -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() {

8
kiss.1
View File

@ -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'