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"