Skip to content

Commit

Permalink
guard venv boostrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-B authored and Fabien-B committed Jun 17, 2024
1 parent a04674b commit 4d5f04e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ do
if [ "$arg" = "-s" ] || [ "$arg" = "--source" ]
then
BASHRC_SOURCE_VENV=true
"venv source will be added to ~/.bashrc"
fi

done


if [ $VIRTUAL_ENV ]
then
echo "Cannot create venv from itself! Run 'deactivate' first if you want to recreate the venv."
USE_VENV = false
BASHRC_SOURCE_VENV=false
fi


if [ "$USE_VENV" = true ]
then
sudo apt install -y python3 python3-venv
Expand All @@ -40,6 +47,7 @@ then

if [ "$BASHRC_SOURCE_VENV" = true ]
then
echo "venv source will be added to ~/.bashrc"
echo "source $(pwd)/pprzEnv/bin/activate" >> ~/.bashrc
fi

Expand Down

0 comments on commit 4d5f04e

Please sign in to comment.