-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·32 lines (26 loc) · 958 Bytes
/
setup.sh
File metadata and controls
executable file
·32 lines (26 loc) · 958 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
31
32
#!/usr/bin/env bash
set -e
# Detect OS
OS_TYPE="$(uname -s 2>/dev/null || echo Windows)"
if [[ "$OS_TYPE" == "Darwin" || "$OS_TYPE" == "Linux" ]]; then
echo "[Setup] Detected macOS/Linux."
PYTHON_CMD="python3"
PIP_CMD="pip3"
else
echo "[Setup] Detected Windows."
PYTHON_CMD="python"
PIP_CMD="pip"
fi
# 1. Install Python dependencies (with protobuf pin for ChromaDB)
echo "[Setup] Installing Python dependencies..."
$PIP_CMD install --upgrade pip
$PIP_CMD install -r requirements.txt
# 2. Compile Java bridge if needed (javabridge/JavaParserBridge.class)
echo "[Setup] Compiling Java bridge if needed..."
if [ ! -f javabridge/JavaParserBridge.class ]; then
javac -cp lib/javaparser-core-3.25.4.jar javabridge/JavaParserBridge.java
fi
# 3. Run interactive configuration (Spring Boot path, LLM, etc)
echo "[Setup] Running interactive configuration..."
$PYTHON_CMD configure_llm.py
echo "[Setup] Setup complete! You can now run: bash run.sh"