29 lines
466 B
Bash
29 lines
466 B
Bash
#!/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
|