feat: download and install extra DMG/PKG/ZIP installers during restore

Adds a simple config file (~/.config/ssr/extra-installers.txt) where
users can list installer URLs for apps not available on Homebrew or MAS
(e.g. EasyMCP Desktop, internal tools).

lib/installers.sh:
  - Supports .dmg (mount → cp .app or run .pkg), .pkg, .zip
  - Skips entries already present in /Applications
  - Non-fatal: logs warnings and continues on failure

ssr sync:  copies extra-installers.txt to <backup_dir> alongside Brewfile
ssr restore: new `extra_installers` resumable step runs after shell_deps

Format: optional-name <url>   (# comments and blank lines ignored)
Example entry:
  EasyMCP https://github.com/Adobe-AIFoundations/easymcp/.../EasyMCP-Desktop-3.0.3-arm64.dmg

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-12 10:33:56 +02:00
parent 371dea1851
commit 72516b864c
5 changed files with 271 additions and 0 deletions
+12
View File
@@ -25,6 +25,8 @@ source "$SSR_ROOT/lib/restore-state.sh"
source "$SSR_ROOT/lib/icloud.sh"
# shellcheck source=../lib/shell.sh
source "$SSR_ROOT/lib/shell.sh"
# shellcheck source=../lib/installers.sh
source "$SSR_ROOT/lib/installers.sh"
ssr::require_macos
ssr::load_config
@@ -110,6 +112,16 @@ else
ssr::rs::set "step_shell_deps" "skipped"
fi
# Extra installers: DMG / PKG / ZIP not available via Homebrew or MAS.
# List file is backed up to <backup_dir>/extra-installers.txt by `ssr sync`.
_extra_installers_file="$backup_dir/extra-installers.txt"
if [[ -f "$_extra_installers_file" ]]; then
ssr::rs::run extra_installers "Extra installers" \
ssr::installers::install_from_file "$_extra_installers_file"
else
ssr::rs::set "step_extra_installers" "skipped"
fi
ssr::rs::run macos_defaults "macOS defaults" ssr::macos::apply_defaults
if [[ "${SSR_SNAPSHOT_MACOS_PREFS:-true}" == "true" ]]; then
+5
View File
@@ -17,6 +17,8 @@ source "$SSR_ROOT/lib/apps.sh"
source "$SSR_ROOT/lib/macos-prefs.sh"
# shellcheck source=../lib/icloud.sh
source "$SSR_ROOT/lib/icloud.sh"
# shellcheck source=../lib/installers.sh
source "$SSR_ROOT/lib/installers.sh"
ssr::require_macos
ssr::load_config
@@ -56,6 +58,9 @@ ssr::mackup::backup
ssr::brew::dump "$backup_dir"
ssr::brew::cleanup
# Back up the extra-installers list alongside the Brewfile.
ssr::installers::sync_list "$backup_dir"
# Surface .app bundles that aren't covered by brew cask or the App Store —
# they would otherwise be missed on `ssr restore` and need manual reinstall.
if [[ "${SSR_SCAN_UNMANAGED_APPS:-true}" == "true" ]]; then