From 85eb0cf874b53644003f07b71036463394d180ce Mon Sep 17 00:00:00 2001 From: Ducky Date: Tue, 22 Aug 2023 01:46:05 +0100 Subject: [PATCH] sh.zio.backup: add support for local repos --- usr/local/bin/sh.zio.backup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 4e9563f..b914e51 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -48,6 +48,12 @@ function invoke_restic() { args="${@:2}" case "$(cat "$restic_repo_file")" in + "/"*) + if [[ ! -d "$(cat "$restic_repo_file")" ]]; + say warning "'$(cat "$restic_repo_file")' does not exist. Creating directory..." + mkdir -p "$(cat "$restic_repo_file")" + fi + ;; "b2"*) b2_account_id_file="$secrets_dir/b2-account-id" b2_account_key_file="$secrets_dir/b2-account-key"