You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Double-click from Finder — opens the installed Mac app, or installs on first run.
set -euo pipefail
READER_ROOT="$(cd "$(dirname "$0")" && pwd)"
INSTALLED="$HOME/Applications/Chapter Reader.app"
if [[ -d "$INSTALLED" ]]; then
open -a "$INSTALLED"
exit 0
fi
if ! osascript <<EOF
display dialog "Chapter Reader is not installed yet.
Install once (builds the Mac app with icon), then launch from Applications or the Dock." buttons {"Cancel", "Install now"} default button 2 with title "Chapter Reader"
EOF
then
exit 0
fi
# Quote path so spaces in the clone folder do not break Terminal.
osascript -e "tell application \"Terminal\" to do script \"cd $(printf %q "$READER_ROOT") && ./install-mac-app.sh\""