feat: auto-generate ~/.mackup/ssr-custom.cfg for uncovered dot-dirs

Before each `ssr sync`, scan $HOME for dot-dirs/files not yet present
in the Mackup backup directory and write them into
~/.mackup/ssr-custom.cfg. This covers tools like .claude, .cursor,
.easymcp, .codex, .factory, and any future dot-dir without requiring
the user to write manual Mackup app definitions.

Curated list handles common developer tools; auto-discovery adds the
rest while skipping caches, credential dirs (.ssh, .gnupg, .aws,
.azure) and other volatile state.

Configurable via:
  SSR_MACKUP_AUTODISCOVER=true   (opt-out with false)
  SSR_MACKUP_EXTRA_PATHS="..."   (space-separated $HOME-relative paths)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-12 10:05:16 +02:00
parent 87aaf25235
commit 649449c628
3 changed files with 117 additions and 0 deletions
+6
View File
@@ -46,6 +46,12 @@ ssr::brew::upgrade
# Timeout (seconds) is configurable; default 180s.
ssr::icloud::wait "$mackup_dir" "${SSR_ICLOUD_WAIT_TIMEOUT:-180}"
# Auto-generate ~/.mackup/ssr-custom.cfg for dot-dirs not yet covered by
# Mackup's built-in definitions (e.g. .claude, .cursor, .easymcp, …).
if [[ "${SSR_MACKUP_AUTODISCOVER:-true}" == "true" ]]; then
ssr::mackup::generate_custom_cfg "$mackup_dir"
fi
ssr::mackup::backup
ssr::brew::dump "$backup_dir"
ssr::brew::cleanup