#!/bin/bash # ============================================================ # U-Claw - Portable AI Agent (macOS) # Double-click to start # ============================================================ # # Thin launcher: locate the bundled node and hand off to lib/start.mjs. # All checks, messages and error handling live there so macOS and Windows # cannot drift apart and so every string can be translated. UCLAW_DIR="$(cd "$(dirname "$0")" && pwd)" if [ "$(uname -m)" = "arm64" ]; then NODE_BIN="$UCLAW_DIR/app/runtime/node-mac-arm64/bin/node" else NODE_BIN="$UCLAW_DIR/app/runtime/node-mac-x64/bin/node" fi if [ ! -x "$NODE_BIN" ]; then echo "" echo " U-Claw is missing a file it needs to start." echo " The copy onto this drive probably did not finish." echo "" echo " Copy the U-Claw folder onto the drive again, or run: bash setup.sh" echo "" read -r -p " Press Enter to close this window." exit 1 fi "$NODE_BIN" "$UCLAW_DIR/lib/start.mjs" EXIT_CODE=$? [ "$EXIT_CODE" -ne 0 ] && read -r -p " Press Enter to close this window." exit $EXIT_CODE