cpt

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

commit 5e7341cb6a8a31743ced6889c0c3c59f63621c08
parent a325e0c57bf8378bc46316c708efa8afe07ceb48
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu,  7 May 2020 21:28:41 +0300

kiss: add option to disable prompts

Diffstat:
MCHANGELOG.md | 6++++++
Mkiss | 7++++++-
Mman/kiss.1 | 7+++++++
3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -7,6 +7,12 @@ this project _somewhat_ adheres to [Semantic Versioning]. [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html +1.20.0 - 2020-05-07 +------------------- + +### Added +- `KISS_NOPROMPT` can be specified in order to skip prompts + 1.19.1 - 2020-05-07 ------------------- diff --git a/kiss b/kiss @@ -39,6 +39,11 @@ contains() { } prompt() { + # If a KISS_NOPROMPT variable is set, continue. + # This can be useful for installation scripts and + # bootstrapping. + [ "$KISS_NOPROMPT" ] && return 0 + # Ask the user for some input. [ "$1" ] && log "$1" log "Continue?: Press Enter to continue or Ctrl+C to abort here" @@ -1477,7 +1482,7 @@ args() { l|list) pkg_list "$@" ;; u|update) pkg_updates ;; s|search) for pkg do pkg_find "$pkg" all; done ;; - v|version) log kiss 1.19.1 ;; + v|version) log kiss 1.20.0 ;; h|help|-h|--help|'') exec 2>&1 diff --git a/man/kiss.1 b/man/kiss.1 @@ -172,6 +172,13 @@ export KISS_COLOUR=1 # Enables globally .IP export KISS_COLOUR=0 # Disables globally .PP +.SS DISABLING PROMPTS +User can disable prompts by setting a \fIKISS_NOPROMPT\fR environment value. This +can be useful for scripting purposes. + +.IP +KISS_NOPROMPT=1 kiss b pkg1 pkg2 +.PP .SH ALTERNATIVES SYSTEM When a package with conflicts is installed the conflicting files will be added as "choices" to the alternatives system.