commit ee11a2404493084545dbb5291e1de8c0339dfff1
parent f38f22c551e247e2d7c9c8e6894cf9addf324aec
Author: lash <dev@holbrook.no>
Date: Fri, 23 Dec 2022 06:24:05 +0000
Use better supported virtualenv init command
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/prepare.sh b/python/prepare.sh
@@ -3,15 +3,15 @@
venv=1
if [ ! -d .venv ]; then
python3 -m venv .venv
- if [ $? -ne "0" ]; then
+ if [ "$?" -ne "0" ]; then
>&2 echo "venv module doesn't seem to exiss"
venv=0
fi
fi
-if [ $venv -eq 1 ]; then
+if [ "$venv" -eq "1" ]; then
. .venv/bin/activate
- if [ $? -ne "0" ]; then
+ if [ "$?" -ne "0" ]; then
>&2 echo "virtualenv doesn't seem to exiss"
venv=0
fi
@@ -20,6 +20,6 @@ fi
pip install -r requirements.txt
pip install -r test_requirements.txt
-if [ $venv -eq "1" ]; then
+if [ "$venv" -eq "1" ]; then
deactivate
fi