summaryrefslogtreecommitdiff
path: root/bin/slave-build-connect
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-22 09:03:53 +0100
committerErich Eckner <git@eckner.net>2018-01-22 09:03:53 +0100
commit3c2d64c5f91da9f24ff69af4a76bb8712d23a0ec (patch)
treefdba5d998ad6bc3d29ca765c4d849edb0bd2caf8 /bin/slave-build-connect
parentf8ffc4a1e58df67045f9e88e6b8c99490f0e1134 (diff)
downloadbuilder-3c2d64c5f91da9f24ff69af4a76bb8712d23a0ec.tar.xz
style: "${mysql_command} -e $(...)" -> {...} | ${mysql_command}
Diffstat (limited to 'bin/slave-build-connect')
-rwxr-xr-xbin/slave-build-connect9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/slave-build-connect b/bin/slave-build-connect
index 86ab14b..2ca72a3 100755
--- a/bin/slave-build-connect
+++ b/bin/slave-build-connect
@@ -18,18 +18,17 @@ if [ "${SSH_ORIGINAL_COMMAND%% *}" = "get-assignment" ] || \
printf '%s %s %s\n' "$(date '+%F %T')" "$1" "${SSH_ORIGINAL_COMMAND}" >> \
"${work_dir}/ssh-log"
- ${mysql_command} -e "$(
- # shellcheck disable=SC2016
+ # shellcheck disable=SC2016
+ {
printf 'UPDATE `build_slaves`'
- # shellcheck disable=SC2016
printf ' SET `build_slaves`.`last_connection`=NOW()'
- # shellcheck disable=SC2016
printf ' WHERE `build_slaves`.`name`=from_base64("%s")\n' \
"$(
printf '%s' "$1" | \
base64 -w0
)"
- )"
+ } | \
+ ${mysql_command}
slave="$1" /bin/sh -c "${base_dir}/bin/${SSH_ORIGINAL_COMMAND}"