From 3c2d64c5f91da9f24ff69af4a76bb8712d23a0ec Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 Jan 2018 09:03:53 +0100 Subject: style: "${mysql_command} -e $(...)" -> {...} | ${mysql_command} --- bin/get-assignment | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'bin/get-assignment') diff --git a/bin/get-assignment b/bin/get-assignment index a81a54d..d256248 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -50,33 +50,26 @@ hand_out_assignment() { } | \ sort -u | \ sponge "${work_dir}/package-states/$1.$2.$3.$4.locked" - ${mysql_command} -e "$( - # shellcheck disable=SC2016 + # shellcheck disable=SC2016 + { printf 'UPDATE `build_slaves`' - # shellcheck disable=SC2016 printf ' SET `currently_building` = (' - # shellcheck disable=SC2016 printf ' SELECT `build_assignments`.`id`' - # shellcheck disable=SC2016 printf ' FROM `build_assignments`' - # shellcheck disable=SC2016 printf ' JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`' - # shellcheck disable=SC2016 printf ' JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id`' printf ' WHERE' - # shellcheck disable=SC2016 printf ' `package_sources`.`%s` = from_base64("%s") AND' \ 'pkgbase' "$(printf '%s' "$1" | base64 -w0)" \ 'git_revision' "$(printf '%s' "$2" | base64 -w0)" \ 'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)" - # shellcheck disable=SC2016 printf ' `upstream_repositories`.`name` = from_base64("%s")' \ "$(printf '%s' "$4" | base64 -w0)" printf ')' - # shellcheck disable=SC2016 printf ' WHERE `build_slaves`.`name`=from_base64("%s");' \ "$(printf '%s' "${slave}" | base64 -w0)" - )" + } | \ + ${mysql_command} # lock every loop this package breaks find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \ -- cgit v1.2.3-70-g09d2