From 02af89aed4e7623fd083ca4a6695a0046b4c7339 Mon Sep 17 00:00:00 2001 From: ethernet Date: Thu, 17 Sep 2026 17:45:05 -0400 Subject: [PATCH] test(update): show the home backup's progress while tar runs A checkout-sized tar sits silent for a minute plus, which reads like a hang. bsdtar (macOS) and GNU tar disagree on progress options, so poll the growing archive and overwrite the line every 2s; the loop doubles as a liveness signal and the final wait still propagates tar's exit. --- scripts/update-test/hermes-update-rehearsal.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/update-test/hermes-update-rehearsal.sh b/scripts/update-test/hermes-update-rehearsal.sh index a52f27dea3..d91968a7b6 100755 --- a/scripts/update-test/hermes-update-rehearsal.sh +++ b/scripts/update-test/hermes-update-rehearsal.sh @@ -363,7 +363,17 @@ cmd_pre() { # No -z: the backup root is typically the same internal disk, so the size # saving buys nothing and gzip costs ~5x the wall time on a checkout-sized # tree (72s vs 14s measured on an M1). Rename to .tar to match the format. - tar -cf "$SNAP/hermes-home.tar" -C "$HERMES_HOME" . || die "backup failed (tar)" + # bsdtar (macOS) and GNU tar differ on progress options, so poll the growing + # archive instead — portable, and it doubles as a liveness signal. + local tar_pid + tar -cf "$SNAP/hermes-home.tar" -C "$HERMES_HOME" . & + tar_pid=$! + while kill -0 "$tar_pid" 2>/dev/null; do + printf '\r %s written... ' "$(du -h "$SNAP/hermes-home.tar" 2>/dev/null | cut -f1)" + sleep 2 + done + printf '\r \r' + wait "$tar_pid" || die "backup failed (tar)" elapsed=$((SECONDS - started)) ok "hermes-home.tar ($(du -h "$SNAP/hermes-home.tar" | cut -f1), ${elapsed}s)"