mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-30 05:23:35 +02:00
enhance
This commit is contained in:
@@ -28,6 +28,8 @@ elif [ "$1" == "html5" ]; then
|
||||
python3 etc/report_generator5.py
|
||||
elif [[ "$1" == add* ]]; then
|
||||
python3 script/addFav.py
|
||||
elif [ "$1" == "update" ]; then
|
||||
./update.sh
|
||||
else
|
||||
echo "Please provide a bot to launch (pong/mesh) or a report to generate (html/html5) or addFav"
|
||||
exit 1
|
||||
|
||||
@@ -43,16 +43,20 @@ echo "Local repository updated."
|
||||
|
||||
# Install or update dependencies
|
||||
echo "Installing or updating dependencies..."
|
||||
# check for error: externally-managed-environment and ask if user wants to continue with --break-system-packages
|
||||
if ! pip install -r requirements.txt --upgrade 2>&1 | grep -q "externally-managed-environment"; then
|
||||
pip install -r requirements.txt --upgrade
|
||||
else
|
||||
read -p "Warning: You are in an externally managed environment. Do you want to continue with --break-system-packages? (y/n): " choice
|
||||
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
|
||||
pip install --break-system-packages -r requirements.txt --upgrade
|
||||
if pip install -r requirements.txt --upgrade 2>&1 | grep -q "externally-managed-environment"; then
|
||||
# if venv is found ask to run with launch.sh
|
||||
if [ -d "venv" ]; then
|
||||
echo "A virtual environment (venv) was found. Use launch.sh to update dependencies in the venv."
|
||||
else
|
||||
echo "Update aborted due to dependency installation issue."
|
||||
read -p "Warning: You are in an externally managed environment. Do you want to continue with --break-system-packages? (y/n): " choice
|
||||
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
|
||||
pip install --break-system-packages -r requirements.txt --upgrade
|
||||
else
|
||||
echo "Update aborted due to dependency installation issue."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Dependencies installed or updated."
|
||||
fi
|
||||
|
||||
echo "Dependencies installed or updated."
|
||||
|
||||
Reference in New Issue
Block a user