diff --git a/install.sh b/install.sh index 0f62283..4a129df 100644 --- a/install.sh +++ b/install.sh @@ -7,21 +7,20 @@ install -t /etc/systemd/system/ btrbk.service btrbk.timer instrclone() { declare -A osInfo; -osInfo[/etc/redhat-release]=dnf -osInfo[/etc/arch-release]=pacman -S -osInfo[/etc/SuSE-release]=zypp -osInfo[/etc/debian_version]=apt -osInfo[/etc/alpine-release]=apk +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 - pkgm=${osInfo[$f]} + ${osInfo[$f]} fi done +instbtrbk } -if which rclone; then +if ! which rclone > /dev/null 2>&1; then instbtrbk else instrclone