-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathinstall-mac.sh
More file actions
52 lines (44 loc) · 1.26 KB
/
install-mac.sh
File metadata and controls
52 lines (44 loc) · 1.26 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
echo ""
echo "========================================"
echo " DashClaw Setup"
echo "========================================"
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo -e "${RED}[ERROR] Node.js is not installed!${NC}"
echo ""
echo "Install Node.js first:"
echo " Option 1: https://nodejs.org/"
echo " Option 2: brew install node"
echo ""
if command -v open &> /dev/null; then
open "https://nodejs.org/"
elif command -v xdg-open &> /dev/null; then
xdg-open "https://nodejs.org/"
fi
exit 1
fi
echo -e "${GREEN}[OK]${NC} Node.js found: $(node --version)"
echo ""
# Run the interactive setup script
node scripts/setup.mjs
if [ $? -ne 0 ]; then
echo ""
echo -e "${RED}[ERROR] Setup failed. See errors above.${NC}"
exit 1
fi
# Create start script
cat > start-dashboard.sh << 'EOF'
#!/bin/bash
echo "Starting DashClaw..."
echo "Opening http://localhost:3000 in your browser..."
(sleep 3 && (open "http://localhost:3000" 2>/dev/null || xdg-open "http://localhost:3000" 2>/dev/null)) &
npm run dev
EOF
chmod +x start-dashboard.sh
echo -e "${GREEN}[OK]${NC} Created start-dashboard.sh for easy launching"
echo ""