diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-11 10:59:43 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-11 10:59:43 +0200 |
| commit | e6d0da3f80aac688929c41db37e7233ca7c429cb (patch) | |
| tree | 471aca12d98a0f6622dd55b97a885ce6df8063a8 /sbo-batch-test | |
| parent | b2ca2b700da2c3e7b84173402fc9736fb374ebdd (diff) | |
| download | sbo-batch-tester-e6d0da3f80aac688929c41db37e7233ca7c429cb.tar.gz sbo-batch-tester-e6d0da3f80aac688929c41db37e7233ca7c429cb.zip | |
Add rsync_tree helper (personal subtrees excluded from --delete)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'sbo-batch-test')
| -rwxr-xr-x | sbo-batch-test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sbo-batch-test b/sbo-batch-test index a29461b..f2b9c14 100755 --- a/sbo-batch-test +++ b/sbo-batch-test @@ -331,6 +331,18 @@ rsync_excludes() { done } +# rsync the SBo tree from SBO_RSYNC_URL into <root>, excluding every personal +# subtree from transfer AND deletion. Flags match sbopkg's own rsync (files +# root:root). Returns rsync's exit status; caller decides hard-fail vs warn. +rsync_tree() { + local root="$1" + local excludes=() + mapfile -t excludes < <(rsync_excludes) + rsync -a --delete --no-owner --no-group \ + "${excludes[@]}" \ + "$SBO_RSYNC_URL/" "$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: |
