From: Oleg Broytman Date: Mon, 20 Nov 2023 00:16:46 +0000 (+0300) Subject: Chore(venv): Only run `pip install` on fresh virtual env X-Git-Tag: 5.0.0~15 X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=commitdiff_plain;h=da4ae53194bee4fde776d2bca07db275d6102a62 Chore(venv): Only run `pip install` on fresh virtual env --- 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