Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
Latest commit
executable file
·64 lines (56 loc) · 1.98 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·64 lines (56 loc) · 1.98 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
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# Check for flags
TEST_MODE=false
SKIP_INSTALL=false
forargin"$@";do
if [ "$arg"=="--test" ];then
TEST_MODE=true
echo"Running in test mode - will skip analysis step"
elif [ "$arg"=="--skip-install" ];then
SKIP_INSTALL=true
echo"Skipping installation steps"
fi
done
if [ "$SKIP_INSTALL"=false ];then
echo"Installing dependencies for langgraph..."
echo"1. make venv and install.."
python -m venv venv || { echo"Failed to create virtual environment";exit 1; }
source venv/bin/activate || { echo"Failed to activate virtual environment";exit 1; }
pip install langgraph-cli || { echo"Failed to install langgraph-cli";exit 1; }
pip install -e ./app || { echo"Failed to install app package";exit 1; }
else
echo"Skipping installation steps - activating existing venv"
source venv/bin/activate || { echo"Failed to activate virtual environment";exit 1; }
fi
echo -e "\033[31m2. make callgraph...\033[0m"
echo -e "\033[31mplease input root directory of project\033[0m"
read root_dir
echo -e "\033[31mplease input src directory of project\033[0m"
read src_dir
echo -e "\033[31m3. Prepare analyze data and callgraph...\033[0m"
# Only run AnalyzeSolidity if not in test mode
if [ "$TEST_MODE"=false ];then
output_analyze_solidity="app/final_analyze_results.json"
if [ !-f"$output_analyze_solidity" ];then
echo"Analyzing Solidity..."
python app/src/utils/AnalyzeSolidity.py $src_dir$output_analyze_solidity
if [ $?-ne 0 ];then
echo"AnalyzeSolidity.py failed"
exit 1
fi
else
echo"Analyze Solidity file $output_analyze_solidity already exists. Skipping analysis."
fi
else
echo"Skipping AnalyzeSolidity.py in test mode"
fi
echo -e "\033[31m4. prepare Redis server..\033[0m"
make clean
make redis
if [ $?-ne 0 ];then
echo"Failed to start Redis server"
exit 1
fi
echo -e "\033[31m5. run langgraph...\033[0m"
cd app || { echo"Failed to change directory to app";exit 1; }
langgraph dev --allow-blocking