eris/install-dependencies
Andrew Hamilton 5b08029d0b Make vigil work on other distributions. (fedora, debian, archlinux)
- Now using python3.4 on debian, and python3.5 elsewhere.
 - Added test-distributions script that checks that
   install-dependencies works on different distributions.
2017-05-17 16:46:54 +01:00

22 lines
683 B
Bash
Executable file

#!/bin/bash
set -e
DIST_ID=$(cat /etc/os-release | grep "^ID=" | cut -d "=" -f 2)
if [ $DIST_ID == "fedora" ]; then
INSTALL_CMD="dnf -y install"
INOTIFY_NAME="python3-inotify python3-pygments python3-docopt python3-pillow"
elif [ $DIST_ID == "arch" ]; then
INSTALL_CMD="pacman -S --noconfirm"
INOTIFY_NAME="python-pyinotify python-pygments python-docopt python-pillow"
else
INSTALL_CMD="apt --yes install"
INOTIFY_NAME="python3-pyinotify python3-pygments python3-docopt python3-pillow"
fi
echo "Install the dependencies of the vigil script..."
sudo $INSTALL_CMD $INOTIFY_NAME util-linux
echo
echo "Install all the tools vigil may need..."
./install-tools