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-06-20 13:42:55 +0200
committerErich Eckner <git@eckner.net>2018-06-20 13:42:55 +0200
commit82a45c6d0e43ed0aa10c3473c69294ce545e7e09 (patch)
tree7955cd1d32fcd997dae64c7bc8a9ae6217f826dc /bin
parent8b38129b5ea7c240d48cdc0f5216c2ec7b6a6c24 (diff)
bin/ping-from-slave: talk to operators in pms
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ping-from-slave14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/ping-from-slave b/bin/ping-from-slave
index 26fd8c9..94fa1c8 100755
--- a/bin/ping-from-slave
+++ b/bin/ping-from-slave
@@ -42,17 +42,21 @@ if [ "${status% *}" != '1' ]; then
printf ' SET `build_slaves`.`is_sane`=0'
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${slave}" | base64 -w0)"
- printf 'SELECT CONCAT('
- printf '`persons`.`name`,": Your buildslave \\"",'
- printf '`build_slaves`.`name`,"\\" builds some outdated package."'
- printf ') FROM `build_slaves`'
+ printf 'SELECT'
+ printf ' `persons`.`name`,'
+ printf '`build_slaves`.`name`'
+ printf ' FROM `build_slaves`'
mysql_join_build_slaves_ssh_keys
mysql_join_ssh_keys_persons
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${slave}" | base64 -w0)"
} | \
mysql_run_query | \
- irc_say
+ while read -r operator slave; do
+ printf '/j %s Your buildslave "%s" builds some outdated package.\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ done
fi
fi
exit 2