#!/bin/bash # Double-click to start CheatSpecter on macOS. Add "demo" to try it without a console: # ./Start\ CheatSpecter.command demo cd "$(dirname "$0")" || exit 1 if ! command -v node >/dev/null 2>&1; then echo "CheatSpecter needs Node.js. Install it from https://nodejs.org and open this again." read -r -p "Press Return to close." exit 1 fi if [ ! -d node_modules ]; then echo "First run: installing (about a minute)..." npm install || { read -r -p "Install failed. Press Return to close."; exit 1; } fi if [ "$1" = "demo" ]; then npm run demo -- --open else npm start -- --open fi