From da4ae53194bee4fde776d2bca07db275d6102a62 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 20 Nov 2023 03:16:46 +0300 Subject: [PATCH] Chore(venv): Only run `pip install` on fresh virtual env --- bkmk-venv | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bkmk-venv b/bkmk-venv index 10dfcbe..f68a0a8 100644 --- a/bkmk-venv +++ b/bkmk-venv @@ -2,8 +2,9 @@ # it should be sourced into the current shell. if [ -z "$VIRTUAL_ENV" ]; then - test -d .venv || python3 -m virtualenv .venv - . .venv/bin/activate && - pip install --compile --upgrade beautifulsoup4 lxml m_lib.full || - exit 1 + test -d .venv && . .venv/bin/activate || { + python3 -m virtualenv .venv && + . .venv/bin/activate && + pip install --compile --upgrade beautifulsoup4 lxml m_lib.full + } || exit 1 fi -- 2.39.5