From ecc46adbdc33951bb8e683e9d46c4771e1d35704 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 Jan 2018 14:09:21 +0100 Subject: bin/build-master-status-from-mysql new --- bin/build-master-status-from-mysql | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/build-master-status-from-mysql (limited to 'bin') diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql new file mode 100755 index 0000000..9626b27 --- /dev/null +++ b/bin/build-master-status-from-mysql @@ -0,0 +1,30 @@ +#!/bin/sh + +# report about status of build master - according to mysql database + +# shellcheck source=conf/default.conf +. "${0%/*}/../conf/default.conf" +# shellcheck source=bin/mysql-functions +. "${base_dir}/bin/mysql-functions" + +# shellcheck disable=SC2016 +${mysql_command} ' + SELECT `build_slaves`.`name`,`build_slaves`.`operator`,`package_sources`.`pkgbase`,`build_slaves`.`last_connection` + FROM `build_slaves` + LEFT JOIN `build_assignments` ON + `build_slaves`.`currently_building`=`build_assignments`.`id` + LEFT JOIN `package_sources` ON + `build_assignments`.`package_source`=`package_sources`.`id` +' --html | \ + sed ' + s,,\0\n,g + ' | \ + sed ' + \,$, { + s,pkgbase,currently building, + y,_, , + } + 1 i list of build slaves + $ a + ' > \ + "${webserver_directory}/build-slaves.html" -- cgit v1.2.3-70-g09d2