You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
575 B
Bash

#!/bin/bash/
instbtrbk() {
install btrbk /usr/local/bin/
install btrbk.conf /etc/btrbk.conf
install -t /etc/systemd/system/ btrbk.service btrbk.timer
systemctl daemon-reload
}
instrclone() {
declare -A osInfo;
osInfo[/etc/redhat-release]="dnf -y install rclone"
osInfo[/etc/arch-release]="pacman -Sy --noconfirm rclone"
osInfo[/etc/debian_version]="curl https://rclone.org/install.sh | sudo bash"
for f in ${!osInfo[@]}
do
if [[ -f $f ]];then
${osInfo[$f]}
fi
done
instbtrbk
}
if ! which rclone > /dev/null 2>&1; then
instbtrbk
else
instrclone
fi