From a416a883d2c635224d007bf71b94151259bc5a72 Mon Sep 17 00:00:00 2001 From: snaki Date: Fri, 27 May 2022 16:36:33 +0200 Subject: [PATCH] initial commit uwu --- install.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 install.sh 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