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
573 B
Bash

#!/bin/bash/
instbtrbk() {
install btrbk /usr/local/bin/
2 years ago
install btrbk.conf /etc/btrbk.conf
install -t /etc/systemd/system/ btrbk.service btrbk.timer
2 years ago
systemctl daemon-reload
}
instrclone() {
declare -A osInfo;
2 years ago
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
2 years ago
${osInfo[$f]}
fi
done
2 years ago
instbtrbk
}
2 years ago
if ! which rclone > /dev/null 2>&1; then
instbtrbk
else
instrclone
fi