btrbk/install.sh

29 lines
466 B
Bash
Raw Normal View History

2022-05-27 16:36:33 +02:00
#!/bin/bash/
instbtrbk() {
install btrbk /usr/local/bin/
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
for f in ${!osInfo[@]}
do
if [[ -f $f ]];then
pkgm=${osInfo[$f]}
fi
done
}
if which rclone; then
instbtrbk
else
instrclone
fi