summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-08-19 15:32:02 +0200
committerErich Eckner <git@eckner.net>2019-08-19 15:35:46 +0200
commitdc338be6d030d0fae3df15af8b19d54addee4d1d (patch)
tree9f54d743270a0028158ff1a8956ac98bbd3bb8a5
parentbc0d9b10b68687b71e0d825b01391d556624c5fd (diff)
downloadbuilder-dc338be6d030d0fae3df15af8b19d54addee4d1d.tar.xz
bin/manage-fail-reasons: add TODO and make shellcheck happy
-rwxr-xr-xbin/manage-fail-reasons5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/manage-fail-reasons b/bin/manage-fail-reasons
index eaa7ff5..b0d2546 100755
--- a/bin/manage-fail-reasons
+++ b/bin/manage-fail-reasons
@@ -3,6 +3,8 @@
# shellcheck source=../lib/load-configuration
. "${0%/*}/../lib/load-configuration"
+# TODO: deduplicate matching logic (with bin/return-assignment)
+
# shellcheck disable=SC2016
usage() {
>&2 echo ''
@@ -52,6 +54,7 @@ case "$1" in
;;
esac
fail_reason_identifiers=$(
+ # shellcheck disable=SC2016
{
printf 'SELECT id,severity,name,replace(to_base64(`fail_reasons`.`identifier`),"\\n","")'
printf ' FROM `fail_reasons` ORDER BY `fail_reasons`.`severity` ASC, `fail_reasons`.id ASC'
@@ -67,7 +70,7 @@ case "$1" in
"$filelog"; then
echo 'match'
ident=$(printf '%s' "${identifier}" | base64 -d -)
- printf "$name ($id, $ident) matches with severity $severity\n"
+ printf '%s (%s,%s) matches with severity %s\n' "$name" "$id" "$ident" "$severity"
fi
done
zcat "$filelog" | tail -n 4