From 8a7df4ba9f8d321a342208b7b3632b3d27b3325d Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Mon, 12 Aug 2024 01:19:55 -0400 Subject: [PATCH] Update wgd.sh --- src/wgd.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/wgd.sh b/src/wgd.sh index f6b93cd..a0ba35d 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -180,16 +180,19 @@ install_wgd(){ else printf "[WGDashboard] \xE2\x9C\x94 Python is installed\n" fi + + version_pass=$(python3 -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 10) else print("0");') + if [ $version_pass == "0" ] + then + printf "[WGDashboard] WGDashboard required Python 3.10 or above\n" + exit 1 + fi + _installPythonVenv _installPythonPip - version_pass=$(python3 -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 10) else print("0");') - if [ $version_pass == "0" ] - then - printf "[WGDashboard] WGDashboard required Python 3.10 or above\n" - exit 1 - fi + if [ ! -d "db" ] then