add a [-f|--force] option to remove confirmation on some commands

Cette révision appartient à :
Jérémy Lecour 2020-10-11 14:57:47 +02:00
Parent 9eae80c002
révision 2ccd8c1b8d
3 fichiers modifiés avec 6 ajouts et 0 suppressions

Voir le fichier

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

3
bkctld
Voir le fichier

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

Voir le fichier

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