#!/usr/bin/env bash # Check: Last backup has passed restore drill # Returns 0 if restore drill completed, 1 otherwise set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SKILL_ROOT="$(dirname "$SCRIPT_DIR")" : "${OUTPUT_DIR:=$SKILL_ROOT/outputs}" # Check for last run pointer [[ -f "$OUTPUT_DIR/last_run_dir.txt" ]] || exit 1 run_dir="$(cat "$OUTPUT_DIR/last_run_dir.txt")" # Check for restore drill completion [[ -f "$run_dir/last_restore_dir.txt" ]]