From: Matthias Kruk Date: Thu, 15 Apr 2021 21:29:14 +0000 (+0900) Subject: buildbot,distbot,watchbot: Adapt to latest toolbox version X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=5074c5e7671c9d7fe3f7a0710d953acc3c36df74;p=foundry buildbot,distbot,watchbot: Adapt to latest toolbox version The latest toolbox implements the --verbose and --shush options inside the opt module, so it's no longer necessary to implement them explicitly. This commit removes the --verbose and --shush options from all bots. --- diff --git a/buildbot.sh b/buildbot.sh index 19b2501..3c98256 100644 --- a/buildbot.sh +++ b/buildbot.sh @@ -140,24 +140,6 @@ stop() { return 0 } -verbosity_increase() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity++)) - log_set_verbosity "$verbosity" - return 0 -} - -verbosity_decrease() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity--)) - log_set_verbosity "$verbosity" - return 0 -} - main() { local gpgkey local tqueue @@ -166,9 +148,7 @@ main() { opt_add_arg "k" "gpgkey" "yes" "" "The GPG key id to use" opt_add_arg "t" "task-queue" "yes" "" "The queue to watch for tasks" opt_add_arg "d" "done-queue" "yes" "" "The queue to place build artifacts" - opt_add_arg "v" "verbose" "no" 0 "Be more verbose" verbosity_increase - opt_add_arg "w" "shush" "no" 0 "Be less verbose" verbosity_decrease - opt_add_arg "s" "stop" "no" 0 "Stop the running instance" + opt_add_arg "s" "stop" "no" 0 "Stop the running instance" if ! opt_parse "$@"; then return 1 diff --git a/distbot.sh b/distbot.sh index 8fc3a0e..4812268 100755 --- a/distbot.sh +++ b/distbot.sh @@ -172,32 +172,12 @@ watch_new_packages() { return 0 } -increase_verbosity() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity++)) - log_set_verbosity "$verbosity" - return 0 -} - -decrease_verbosity() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity--)) - log_set_verbosity "$verbosity" - return 0 -} - main() { local repo_path local repo_codename local watchdir opt_add_arg "s" "stop" "no" 0 "Stop a running instance" - opt_add_arg "v" "verbose" "no" 0 "Be more verbose" increase_verbosity - opt_add_arg "w" "shush" "no" 0 "Be less verbose" decrease_verbosity if ! opt_parse "$@"; then return 1 diff --git a/watchbot.sh b/watchbot.sh index 59d39ea..6535dae 100755 --- a/watchbot.sh +++ b/watchbot.sh @@ -101,24 +101,6 @@ watch_to_head() { return 0 } -verbosity_increase() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity++)) - log_set_verbosity "$verbosity" - return 0 -} - -verbosity_decrease() { - local verbosity - - verbosity=$(log_get_verbosity) - ((verbosity--)) - log_set_verbosity "$verbosity" - return 0 -} - main() { declare -ag watchlist # will be gone once forked to the background local watches @@ -128,8 +110,6 @@ main() { opt_add_arg "r" "repo" "yes" "" "Repository to watch (format: /repo/path[#branch])" watchlist_add opt_add_arg "q" "queue" "yes" "" "Queue used to distribute work" opt_add_arg "s" "stop" "no" 0 "Stop a running instance" - opt_add_arg "v" "verbose" "no" 0 "Be more verbose" verbosity_increase - opt_add_arg "w" "shush" "no" 0 "Be less verbose" verbosity_decrease if ! opt_parse "$@"; then return 1