2015-12-26 20:52:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2017-06-01 01:03:39 +01:00
|
|
|
# Copyright (C) 2017 Andrew Hamilton. All rights reserved.
|
|
|
|
|
# Licensed under the Artistic License 2.0.
|
|
|
|
|
|
2015-12-26 20:52:39 +00:00
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
2017-05-17 16:46:54 +01:00
|
|
|
DIST_ID=$(cat /etc/os-release | grep "^ID=" | cut -d "=" -f 2)
|
|
|
|
|
if [ $DIST_ID == "fedora" ]; then
|
|
|
|
|
INSTALL_CMD="dnf -y install"
|
2017-05-31 19:41:56 +01:00
|
|
|
DEPS="python3-distro python3-inotify python3-pygments python3-docopt python3-pillow"
|
2017-05-17 16:46:54 +01:00
|
|
|
elif [ $DIST_ID == "arch" ]; then
|
2017-05-21 10:30:48 +01:00
|
|
|
INSTALL_CMD="pacman -S --noconfirm --needed"
|
2017-05-31 19:41:56 +01:00
|
|
|
DEPS="python-pyinotify python-pygments python-docopt python-pillow"
|
|
|
|
|
sudo pacman -S --noconfirm python-pip
|
|
|
|
|
sudo pip3 install distro
|
|
|
|
|
elif [ $DIST_ID == "opensuse" ]; then
|
|
|
|
|
INSTALL_CMD="zypper -n install"
|
|
|
|
|
DEPS="python3-pyinotify python3-Pygments python3-docopt python3-Pillow"
|
|
|
|
|
sudo pip3 install distro
|
|
|
|
|
elif [ $DIST_ID == "debian" ]; then
|
|
|
|
|
INSTALL_CMD="apt --yes install"
|
|
|
|
|
DEPS="python3-pyinotify python3-pygments python3-docopt python3-pillow"
|
|
|
|
|
sudo apt --yes install python3-pip
|
|
|
|
|
sudo pip3 install distro
|
2017-05-17 16:46:54 +01:00
|
|
|
else
|
|
|
|
|
INSTALL_CMD="apt --yes install"
|
2017-05-31 19:41:56 +01:00
|
|
|
DEPS="python3-distro python3-pyinotify python3-pygments python3-docopt python3-pillow"
|
2017-05-17 16:46:54 +01:00
|
|
|
fi
|
2017-05-31 19:41:56 +01:00
|
|
|
echo "Installing the dependencies of the vigil script..."
|
|
|
|
|
sudo $INSTALL_CMD $DEPS util-linux
|
2015-12-26 20:52:39 +00:00
|
|
|
echo
|
2017-05-31 19:41:56 +01:00
|
|
|
echo "Installing all the tools vigil may need..."
|
2015-12-26 20:52:39 +00:00
|
|
|
./install-tools
|