index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-09-19 06:23:39 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-19 06:23:39 +0200 |
commit | 3a505e4c944af219091b5a6390f61fb75733ecda (patch) | |
tree | 9bbb0a955b17ce064c9bf1329a427d8daf07b038 | |
parent | 4caf7ceb7c3f6157e6890781ec463d0afdcc904c (diff) |
-rwxr-xr-x | bin/nit-picker | 9 |
diff --git a/bin/nit-picker b/bin/nit-picker index f685458..4caa4e0 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -89,6 +89,12 @@ build_duration_check=0 while pgrep -x ii >/dev/null \ || ! ${irc}; do if [ $# -eq 0 ]; then + if [ "$(date +%s)" -gt "$((build_duration_check + 60*60*24))" ]; then + check_build_duration=true + build_duration_check=$(date +%s) + else + check_build_duration=false + fi # shellcheck disable=SC2016 { printf 'SELECT DISTINCT' @@ -121,13 +127,12 @@ while pgrep -x ii >/dev/null \ printf ' WHERE `repositories`.`is_on_master_mirror`' printf ';\n' - if [ "$(date +%s)" -gt "$((build_duration_check + 60*60*24))" ]; then + if "${check_build_duration}"; then printf 'SELECT' printf ' "build-duration",' printf '`build_slaves`.`name`' printf ' FROM `build_slaves`' printf ';\n' - build_duration_check=$(date +%s) fi printf 'SELECT DISTINCT' |