diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-11 11:04:39 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-11 11:04:39 +0200 |
| commit | 2f15e8ee57dd32ab6962fa2b467ccbdb0ecdf1a9 (patch) | |
| tree | da546c5a98f02fe5173d14a1a5b92fcaa65acc23 | |
| parent | 2a0866581c6c909061baca3d3252a2137719defb (diff) | |
| download | sbo-batch-tester-2f15e8ee57dd32ab6962fa2b467ccbdb0ecdf1a9.tar.gz sbo-batch-tester-2f15e8ee57dd32ab6962fa2b467ccbdb0ecdf1a9.zip | |
Add update_personal_trees (rsync-unshadow + pull + shadow)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rwxr-xr-x | sbo-batch-test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sbo-batch-test b/sbo-batch-test index b33bb65..1ff4e76 100755 --- a/sbo-batch-test +++ b/sbo-batch-test @@ -428,6 +428,34 @@ setup_repo() { exit 0 } +# --update: per-run refresh. rsync the tree (--delete, personal excluded) to +# unshadow + refresh upstream, git-pull each personal subtree, re-shadow. Inline +# and fail-soft: a network hiccup warns but never kills the build session. +update_personal_trees() { + local root="${SBO_TREE_ROOTS[0]}" + [[ -n "$root" ]] || { echo "SBO_TREE_ROOTS[0] is empty; skipping --update." >&2; return; } + + if [[ -n "$SBO_RSYNC_URL" ]]; then + echo "Refreshing tree (rsync, personal subtrees preserved)..." + rsync_tree "$root" || echo "WARN: rsync failed; continuing." >&2 + else + echo "SBO_RSYNC_URL unset; skipping tree rsync (no unshadow)." >&2 + fi + + local dir d + for dir in "${!SBO_PERSONAL_TREES[@]}"; do + d="$root/$dir" + if [[ ! -d "$d/.git" ]]; then + echo "WARN: $d is not a git clone, skipping pull." >&2 + continue + fi + echo "Pulling $dir..." + git -C "$d" pull || echo "WARN: git pull failed in $dir; continuing." >&2 + done + + shadow_scan "$root" +} + # ============================================================================= # Package cache. Persistent, on-disk store of built packages so unchanged deps # are installed from cache instead of rebuilt. Layout mirrors the SBo tree: |
