2024-05-27 21:59:41 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo
|
|
|
|
|
2024-05-29 00:03:47 +08:00
|
|
|
. /etc/os-release
|
|
|
|
|
|
|
|
if [[ $ID == "debian" ]]; then
|
2024-05-30 23:24:55 +08:00
|
|
|
apt update && apt-get install -y rsync jq parallel
|
2024-05-30 23:16:18 +08:00
|
|
|
elif [[ $ID_LIKE == "arch" ]]; then
|
2024-05-30 23:24:55 +08:00
|
|
|
pacman -Syyu && pacman -S parallel jq rsync
|
2024-05-30 23:16:18 +08:00
|
|
|
else
|
|
|
|
printf "Distro not found. Exiting."
|
|
|
|
exit 1
|
2024-05-29 00:03:47 +08:00
|
|
|
fi
|
|
|
|
|
2024-05-27 21:59:41 +08:00
|
|
|
mkdir -p /etc/file-o-bot/config.d
|
2024-05-29 00:03:47 +08:00
|
|
|
cp file-o-bot /usr/local/bin/file-o-bot
|
2024-05-30 23:16:18 +08:00
|
|
|
cp ./install-files/{default-config.ini,movement.json} /etc/file-o-bot/
|
|
|
|
cp ./install-files/config.ini /etc/file-o-bot/config.d/
|