#!/usr/bin/env bash
set -euo pipefail

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$script_dir/lib/common.sh"

repo_root="$(backup_repo_root)"
backup_root="${BACKUP_ROOT:-$repo_root/backups}"

if [[ ! -d "$backup_root" ]]; then
  backup_log "No backup directory found: $backup_root"
  exit 0
fi

find "$backup_root" -maxdepth 1 -type d -name 'baron-sso-backup-*' | sort
