Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
803 B · 36 lines
Shell
12345678910111213141516171819202122232425262728293031323334353637#!/bin/bash# Auto-restart wrapper for Electron app on macOS/Linux host# This runs on the HOST machine, not in the devcontainer
cd "$(dirname "$0")"
echo "🎨 Aesthetic Computer - Auto-restart wrapper"echo "→ Working directory: $(pwd)"echo "→ Press Ctrl+C twice quickly to stop"echo ""
RESTART_COUNT=0
while true; do if [ $RESTART_COUNT -gt 0 ]; then echo "♻️ Restarting Electron (restart #$RESTART_COUNT)..." sleep 1 fi npm start EXIT_CODE=$? if [ $EXIT_CODE -eq 42 ]; then # Exit code 42 = intentional reboot request RESTART_COUNT=$((RESTART_COUNT + 1)) echo "" echo "✓ Reboot request received" else # Any other exit code = stop echo "" echo "✓ Electron exited with code $EXIT_CODE" break fidone
echo "👋 Goodbye!"