diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 0000000..21009d8 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Baut Lichtkasten, beendet die laufende App, ersetzt /Applications/Lichtkasten.app und startet sie neu. +# Dock-Symbol, Einstellungen, Vorlagen und Codes bleiben erhalten. +set -euo pipefail +cd "$(dirname "$0")/.." + +git pull --ff-only || echo "⚠️ git pull übersprungen" +./scripts/build-app.sh + +if pgrep -x Lichtkasten >/dev/null; then + echo "Beende laufendes Lichtkasten …" + osascript -e 'tell application "Lichtkasten" to quit' || true + for _ in {1..20}; do pgrep -x Lichtkasten >/dev/null || break; sleep 0.5; done +fi + +rm -rf /Applications/Lichtkasten.app +cp -R build/Lichtkasten.app /Applications/ +echo "✅ Installiert: /Applications/Lichtkasten.app" +open /Applications/Lichtkasten.app