Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/manage-fail-reasons
diff options
context:
space:
mode:
Diffstat (limited to 'bin/manage-fail-reasons')
-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