mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-06 07:50:13 +01:00
Update wgd.sh
This commit is contained in:
parent
4c69fd4f60
commit
56044fa3f7
12
src/wgd.sh
12
src/wgd.sh
@ -97,17 +97,12 @@ _installPython(){
|
||||
}
|
||||
|
||||
_installPythonVenv(){
|
||||
if [ "$pythonExecutable" = "python3" ]; then
|
||||
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
||||
then
|
||||
case "$OS" in
|
||||
ubuntu|debian)
|
||||
if [ "$pythonExecutable" = "python3" ]; then
|
||||
{ sudo apt update ; sudo apt-get install -y python3-venv; printf "\n\n"; } &>> ./log/install.txt
|
||||
else
|
||||
sudo apt-get install ${pythonExecutable}-venv
|
||||
printf "\n\n";
|
||||
# { sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt
|
||||
fi
|
||||
;;
|
||||
centos|fedora|redhat)
|
||||
if command -v dnf &> /dev/null; then
|
||||
@ -123,10 +118,13 @@ _installPythonVenv(){
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
{ sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt
|
||||
fi
|
||||
|
||||
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
||||
then
|
||||
printf "[WGDashboard] %s Python Virtual Environment is still not installed, halting script now.\n"
|
||||
printf "[WGDashboard] %s Python Virtual Environment is still not installed, halting script now.\n" "$heavy_crossmark"
|
||||
printf "%s\n" "$helpMsg"
|
||||
else
|
||||
printf "[WGDashboard] %s Python Virtual Environment is installed\n" "$heavy_checkmark"
|
||||
|
Loading…
Reference in New Issue
Block a user