Skip to content

Commit

Permalink
Fix install.sh for Debian (Chia-Network#4152) (Chia-Network#4867)
Browse files Browse the repository at this point in the history
  • Loading branch information
msg7086 authored May 14, 2021
1 parent b2800c9 commit 5f4b567
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash
set -e
UBUNTU=false
DEBIAN=false
if [ "$(uname)" = "Linux" ]; then
#LINUX=1
if type apt-get; then
UBUNTU=true
OS_ID=$(lsb_release -is)
if [ "$OS_ID" = "Debian" ]; then
DEBIAN=true
else
UBUNTU=true
fi
fi
fi

Expand Down Expand Up @@ -35,18 +41,22 @@ fi
if [ "$(uname)" = "Linux" ]; then
#LINUX=1
if [ "$UBUNTU" = "true" ] && [ "$UBUNTU_PRE_2004" = "1" ]; then
# Debian/Ubuntu
echo "Installing on Ubuntu/Debian pre 20.04 LTS."
# Ubuntu
echo "Installing on Ubuntu pre 20.04 LTS."
sudo apt-get update
sudo apt-get install -y python3.7-venv python3.7-distutils
elif [ "$UBUNTU" = "true" ] && [ "$UBUNTU_PRE_2004" = "0" ] && [ "$UBUNTU_2100" = "0" ]; then
echo "Installing on Ubuntu/Debian 20.04 LTS."
echo "Installing on Ubuntu 20.04 LTS."
sudo apt-get update
sudo apt-get install -y python3.8-venv python3-distutils
elif [ "$UBUNTU" = "true" ] && [ "$UBUNTU_2100" = "1" ]; then
echo "Installing on Ubuntu/Debian 21.04 or newer."
echo "Installing on Ubuntu 21.04 or newer."
sudo apt-get update
sudo apt-get install -y python3.9-venv python3-distutils
elif [ "$DEBIAN" = "true" ]; then
echo "Installing on Debian."
sudo apt-get update
sudo apt-get install -y python3-venv
elif type pacman && [ -f "/etc/arch-release" ]; then
# Arch Linux
echo "Installing on Arch Linux."
Expand Down

0 comments on commit 5f4b567

Please sign in to comment.