-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·30 lines (25 loc) · 738 Bytes
/
run.sh
File metadata and controls
executable file
·30 lines (25 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
# Navigate to the script's directory to ensure paths are correct
cd "$(dirname "$0")"
# Ensure Node.js is available
if ! command -v node &>/dev/null; then
echo "Error: Node.js is required but not found. Install it from https://nodejs.org"
exit 1
fi
# Install dependencies if node_modules is missing
if [ ! -d "node_modules" ]; then
echo "Installing dependencies..."
if command -v pnpm &>/dev/null; then
pnpm install
elif command -v npm &>/dev/null; then
npm install
else
echo "Error: pnpm or npm is required to install dependencies"
exit 1
fi
fi
# Ensure color support for the TUI
export COLORTERM=truecolor
# Launch the Ink-based TUI
./node_modules/.bin/tsx src/cli.tsx "$@"