Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/return-assignment
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/return-assignment
parentf8ffc4a1e58df67045f9e88e6b8c99490f0e1134 (diff)
style: "${mysql_command} -e $(...)" -> {...} | ${mysql_command}
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index c47b01c..11ad2a9 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -76,20 +76,18 @@ if [ "$5" = 'ERROR' ]; then
# shellcheck disable=SC2154
echo "${slave}" >> \
"${work_dir}/package-states/$1.$2.$3.$4.broken"
- ${mysql_command} -e "$(
- # shellcheck disable=SC2016
+ # shellcheck disable=SC2016
+ {
printf 'UPDATE `build_assignments`'
- # shellcheck disable=SC2016
printf ' JOIN `build_slaves` ON `build_slaves`.`currently_building`=`build_assignments`.`id`'
- # shellcheck disable=SC2016
printf ' SET `build_assignments`.`is_broken`=1, `build_slaves`.`currently_building`=NULL'
- # shellcheck disable=SC2016
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(
printf '%s' "${slave}" | \
base64 -w0
)"
- )"
+ } | \
+ ${mysql_command}
# shellcheck disable=SC2154
sed -i '