mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 15:17:59 -05:00
Update run.sh (#3752)
Co-authored-by: Richard Beales <rich@richbeales.net>
This commit is contained in:
24
run.sh
24
run.sh
@@ -1,9 +1,25 @@
|
||||
#!/bin/bash
|
||||
python scripts/check_requirements.py requirements.txt
|
||||
|
||||
function find_python_command() {
|
||||
if command -v python &> /dev/null
|
||||
then
|
||||
echo "python"
|
||||
elif command -v python3 &> /dev/null
|
||||
then
|
||||
echo "python3"
|
||||
else
|
||||
echo "Python not found. Please install Python."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
PYTHON_CMD=$(find_python_command)
|
||||
|
||||
$PYTHON_CMD scripts/check_requirements.py requirements.txt
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
echo Installing missing packages...
|
||||
pip install -r requirements.txt
|
||||
$PYTHON_CMD -m pip install -r requirements.txt
|
||||
fi
|
||||
python -m autogpt $@
|
||||
read -p "Press any key to continue..."
|
||||
$PYTHON_CMD -m autogpt $@
|
||||
read -p "Press any key to continue..."
|
||||
Reference in New Issue
Block a user