index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-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' |