Files
file-o-bot/install.sh
2024-06-25 08:37:37 +08:00

20 lines
474 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_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/