#!/bin/env bash # Source: https://stackoverflow.com/a/4774063 PROJECT_ROOT="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/.." rm -rf "$PROJECT_ROOT/backup-restore" "$PROJECT_ROOT/scripts/restic.sh" restore latest --target "$PROJECT_ROOT/backup-restore" (cd "$PROJECT_ROOT/backup-restore/tmp" && unzip forgejo.zip -d ../forgejo) rm -rf "$PROJECT_ROOT/backup-restore/tmp"