git/loop-rebuild
Junio C Hamano 2b90714f51 Meta/loop-rebuild: build with bash
As I usually build in the primary environment with dash,
let's build with bash on the other box.
2024-05-26 17:29:41 -07:00

26 lines
348 B
Bash
Executable File

#!/bin/sh
ssleep () {
seconds=$1
now=$(date "+%s")
sleep $(( ((now + seconds + seconds / 4) / seconds) * seconds - now))
}
stamp () {
Meta/V 2>/dev/null | sha1sum
}
P=previous
O=observed
while :
do
while O=$(stamp) && test "$P" = "$O"
do
ssleep 300
done
ssleep 30
time nice -20 Meta/Dothem -j32; uptime; date
P=$(stamp)
Meta/V
done