-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·45 lines (35 loc) · 1.2 KB
/
setup.sh
File metadata and controls
executable file
·45 lines (35 loc) · 1.2 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
#!/bin/bash
# Required Node.js version
REQUIRED_NODE_VERSION="v23.3.0"
# Get the installed Node.js version
INSTALLED_NODE_VERSION=$(node -v)
# Check if the installed Node.js version matches the required version
if [[ "$INSTALLED_NODE_VERSION" != "$REQUIRED_NODE_VERSION" ]]; then
echo "❌ Error: Node.js version $REQUIRED_NODE_VERSION is required."
echo "You have $INSTALLED_NODE_VERSION. Please install Node.js $REQUIRED_NODE_VERSION and try again."
exit 1
fi
echo "✅ Node.js version check passed: $INSTALLED_NODE_VERSION"
# Initialize and update Git submodules
echo "Initializing and updating Git submodules..."
git submodule update --init --recursive
# Navigate to the eliza submodule and install dependencies
echo "Installing dependencies for Eliza..."
cd eliza
# Copy .env.example to .env
if [ ! -f .env ]; then
echo "Copying .env.example to .env..."
cp .env.example .env
else
echo ".env already exists. Skipping copy."
fi
# Install required packages for Eliza and build
pnpm install --no-frozen-lockfile
pnpm run build
cd ..
# Navigate to the gateway submodule and install dependencies
echo "Installing dependencies for Gateway..."
cd gateway
npm install
cd ..
echo "✅ Setup completed successfully!"