Let the updater apply a new build after restart.

The swap helper now detaches from the app, downloads start when a newer VERSION appears, and checks keep running so a just-published build is not missed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-17 19:49:10 +02:00
commit 2c16cf977d
5 changed files with 180 additions and 59 deletions

View file

@ -74,11 +74,12 @@ fi
command -v curl >/dev/null 2>&1 || die "Na Macu chybí curl, bez něj nejde nic stáhnout."
if [ -w /Applications ]; then
dest_dir="/Applications"
else
dest_dir="$HOME/Applications"
mkdir -p "$dest_dir"
# ~/Applications is writable from the GUI updater later. /Applications
# often is not, even when this installer can drop a .app there once.
dest_dir="$HOME/Applications"
mkdir -p "$dest_dir"
if [ -e "/Applications/Maturita.app" ] && [ -w "/Applications/Maturita.app" ]; then
rm -rf "/Applications/Maturita.app"
fi
tmp=$(mktemp -d)