]> git.corax.cc Git - foundry/commitdiff
buildbot,distbot,watchbot: Adapt to latest toolbox version
authorMatthias Kruk <m@m10k.eu>
Thu, 15 Apr 2021 21:29:14 +0000 (06:29 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 15 Apr 2021 21:32:39 +0000 (06:32 +0900)
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.

buildbot.sh
distbot.sh
watchbot.sh

index 19b2501a34c01358eb90b23ac88956aa099ba459..3c982560674b48914ca0d7e74fe6478d5be9494a 100644 (file)
@@ -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
index 8fc3a0edd39577bb5a87ea88a28ddce7d050e3f2..4812268f45c4a69764e1c599e5ea20de62f77509 100755 (executable)
@@ -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
index 59d39eaa88e5a7cd27995b92a6d670b9b7cf3f6c..6535dae0a85dbcb216abfdc637cd1c248d8ab7b0 100755 (executable)
@@ -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