From 8c8c5a582673141ff26d2613c56179c4b9ff432a Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 16 Aug 2024 03:02:45 -0400 Subject: [PATCH] Update wgd.sh --- src/wgd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wgd.sh b/src/wgd.sh index 0575bcc..9b7a0c8 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -134,7 +134,11 @@ _installPythonPip(){ then case "$OS" in ubuntu|debian) - { sudo apt update ; sudo apt-get install -y python3-pip; printf "\n\n"; } &>> ./log/install.txt + if [ "$pythonExecutable" = "python" ]; then + { sudo apt update ; sudo apt-get install -y python3-pip; printf "\n\n"; } &>> ./log/install.txt + else + { sudo apt update ; sudo apt-get install -y $pythonExecutable-distutil python3-pip; printf "\n\n"; } &>> ./log/install.txt + fi ;; centos|fedora|redhat) if command -v dnf &> /dev/null; then @@ -155,6 +159,7 @@ _installPythonPip(){ then printf "[WGDashboard] %s Python Package Manager (PIP) is still not installed, halting script now.\n" "$heavy_crossmark" printf "%s\n" "$helpMsg" + exit 1 else printf "[WGDashboard] %s Python Package Manager (PIP) is installed\n" "$heavy_checkmark" fi