Added linux distribution checking to install.sh

This commit is contained in:
deopdeop 2020-11-24 20:23:49 +00:00
parent f3a565e879
commit 27c5de3572

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Ubuntu (apt) # Ubuntu (apt)
if command -v apt &> /dev/null; then if cat /etc/os-release | grep ID=ubuntu &> /dev/null; then
echo "Installing packages for Ubuntu (apt)" echo "Installing packages for Ubuntu (apt)"
sudo apt install -y git python3 python3-pip python3-setuptools build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1 sudo apt install -y git python3 python3-pip python3-setuptools build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1
@ -18,7 +18,7 @@ if command -v apt &> /dev/null; then
fi fi
# Arch Linux (pacman) # Arch Linux (pacman)
if command -v pacman &> /dev/null; then if cat /etc/os-release | grep ID=arch &> /dev/null; then
echo "Installing packages for Arch Linux (pacman)" echo "Installing packages for Arch Linux (pacman)"
# Upgrade existing packages (note: no --noconfirm) # Upgrade existing packages (note: no --noconfirm)