Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-25 16:38:16 +0200
committerErich Eckner <git@eckner.net>2018-05-25 16:38:16 +0200
commitf4e19874dc0dbab4b7bf9e5f6085d39f75d83f7e (patch)
treeeb6000f3f5bd82469d21c3a5d2e88cbded50c0bf /bin
parent31a53a88b27143f1e748b69535bdf4264347964c (diff)
bin/ping-from-slave: save number of trials
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ping-from-slave17
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/ping-from-slave b/bin/ping-from-slave
index 2ae9f7e..171661d 100755
--- a/bin/ping-from-slave
+++ b/bin/ping-from-slave
@@ -56,9 +56,22 @@ log_lines=$(cat)
printf 'NULL'
fi
- printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
+ printf ', `build_slaves`.`trials`='
+ if [ -n "${log_lines}" ]; then
+ printf 'from_base64("%s")' \
+ "$(
+ printf '%s\n' "${log_lines}" | \
+ wc -l | \
+ base64 -w0
+ )"
+ else
+ printf 'NULL'
+ fi
+
+ printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \
"$(
- printf '%s' "${slave}" | \
+ # shellcheck disable=SC2154
+ printf '%s' "${slave_id}" | \
base64 -w0
)"
} | \