aboutsummaryrefslogtreecommitdiffstats
path: root/sbo-batch-test
diff options
context:
space:
mode:
Diffstat (limited to 'sbo-batch-test')
-rwxr-xr-xsbo-batch-test28
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: