Files
file-o-bot/install.sh

22 lines
544 B
Bash
Executable File

#!/usr/bin/env bash
set -euo
. /etc/os-release
if [[ $ID == "debian" ]]; then
apt update && apt-get install -y rsync jq parallel
#elif [[ $ID == "centos" ]]; then
# yum -y install jq rsync parallel
elif [[ $ID_LIKE == "arch" ]]; then
pacman -Syyu && pacman -S parallel jq rsync
else
printf "Distro not found. Exiting."
exit 1
fi
mkdir -p /etc/file-o-bot/config.d
cp file-o-bot /usr/local/bin/file-o-bot
cp ./install-files/{default-config.ini,movement.json} /etc/file-o-bot/
cp ./install-files/config.ini /etc/file-o-bot/config.d/