31 lines
610 B
Bash
31 lines
610 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
SKILL_DIR="$(dirname "$(dirname "$0")")"
|
|
UI_DIR="$SKILL_DIR/ui"
|
|
|
|
echo "=== Fleet Dashboard Setup ==="
|
|
|
|
# Check for Node.js
|
|
if ! command -v node &>/dev/null; then
|
|
echo "Installing Node.js..."
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
fi
|
|
|
|
echo "Node.js version: $(node --version)"
|
|
echo "npm version: $(npm --version)"
|
|
|
|
# Install UI dependencies
|
|
cd "$UI_DIR"
|
|
if [ ! -d "node_modules" ]; then
|
|
echo "Installing UI dependencies..."
|
|
npm install
|
|
fi
|
|
|
|
# Build UI
|
|
echo "Building UI..."
|
|
npm run build
|
|
|
|
echo "Fleet Dashboard setup complete"
|