From: Ralph Ronnquist Date: Fri, 22 Sep 2023 12:07:28 +0000 (+1000) Subject: Create restoration base as needed X-Git-Tag: 0.1~10 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=8e06fe970903b95547a95e8ff419f2c0b74b24c2;p=rrq%2Fbuckap.git Create restoration base as needed --- diff --git a/restore.sh b/restore.sh index 92faab6..872a9eb 100755 --- a/restore.sh +++ b/restore.sh @@ -60,20 +60,21 @@ Options = $OPTIONS EOF read -p "Go ahead [Yn]?" X [ "$X" = n ] && return 0 + mkdir -p "$RESTORE/$TIME$BASE" || return 1 duplicity restore $OPTIONS --file-to-restore "$1" --time "$TIME" \ "pexpect+scp://$URI" "$RESTORE/$TIME$BASE/$1" } # $1 root browse() { - local X Y + local X while true ; do X="$(grep -oE "^$1[^/]*/?" < $LIST | uniq | iselect -fa)" [ -z "$X" ] && break if [ -z "${X##*/}" ] ; then browse "$X" else - restore "$X" + restore "$X" || read -p "push enter" X fi done }