#!/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