diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..0f62283 --- /dev/null +++ b/install.sh @@ -0,0 +1,28 @@ +#!/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