Skip to content

Instantly share code, notes, and snippets.

@drvenabili
Last active July 14, 2021 11:51
Show Gist options
  • Save drvenabili/da1d5bec111cc4ac34b4fd4f49b6ff28 to your computer and use it in GitHub Desktop.
Save drvenabili/da1d5bec111cc4ac34b4fd4f49b6ff28 to your computer and use it in GitHub Desktop.
# à mettre dans /usr/local/bin
#!/usr/bin/env bash
if [ ! -d "env" ]; then
echo "Creating venv..."
python3 -m venv env
echo "Activating venv..."
source env/bin/activate
if test -f "requirements.txt"; then
echo "Installing reqs..."
pip install wheel
pip install -r requirements.txt
fi
echo ""
echo "Done! Now source env/bin/activate"
else
echo "venv exists, do source env/bin/activate"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment