From fdb02f882949e77f34de7fec241354b878ded936 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 3 Feb 2023 22:24:21 -0800 Subject: [PATCH] Create venv if it is missing (#1089) --- python/web/translation_update.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/web/translation_update.sh b/python/web/translation_update.sh index ac9d2e22..2a043360 100755 --- a/python/web/translation_update.sh +++ b/python/web/translation_update.sh @@ -2,10 +2,16 @@ set -e cd "$(dirname "$0")" -# Check for the existence of a python venv in the current dir + +# Create the venv if it doesn't exist if ! test -e venv; then - echo "No python venv detected. Please run start.sh first." - exit 1 + echo "Creating python venv for PiSCSI-Web" + python3 -m venv venv + echo "Activating venv" + source venv/bin/activate + echo "Installing requirements.txt" + pip3 install wheel + pip3 install -r requirements.txt fi source venv/bin/activate