From 2ccd8c1b8d3a8543ead54f090c0a66a086a4cac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 11 Oct 2020 14:57:47 +0200 Subject: [PATCH] add a [-f|--force] option to remove confirmation on some commands --- CHANGELOG.md | 2 ++ bkctld | 3 +++ lib/includes | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69d1688..b59c51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +* bkctld: add a [-f|--force] option to remove confirmation on some commands + ### Changed * Better help message composition and formating diff --git a/bkctld b/bkctld index b46810d..07d399a 100755 --- a/bkctld +++ b/bkctld @@ -50,6 +50,9 @@ while :; do show_version exit 0 ;; + -f|--force) + FORCE=1 + ;; *) # Default case: If no more options then break out of the loop. break diff --git a/lib/includes b/lib/includes index 3b97162..9b0c211 100755 --- a/lib/includes +++ b/lib/includes @@ -27,6 +27,7 @@ LOGLEVEL="${LOGLEVEL:-6}" CRITICAL="${CRITICAL:-48}" WARNING="${WARNING:-24}" DUC=$(command -v duc-nox || command -v duc) +FORCE=0 show_version() { cat <