forked from Significant-Gravitas/AutoGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update run.sh (Significant-Gravitas#3752)
Co-authored-by: Richard Beales <[email protected]>
- Loading branch information
1 parent
ad8b8cb
commit d9170ca
Showing
1 changed file
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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..." |