Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nit-picker9
1 files changed, 7 insertions, 2 deletions
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'