refactor backup-list

This commit is contained in:
LinuxSquare 2025-04-10 21:42:14 +02:00
parent 3e64261986
commit 4a956a45bc

View file

@ -36,10 +36,10 @@ function backup_destroy() {
function backup_list() {
local backupdir="$(getValueByKey 'PODMAN_DIRECTORY')/${1}/backup"
local found_backups="$(find "$backupdir" -type f -print)"
local found_backups=($(find "$backupdir" -type f -print))
log i "Found ${#found_backups[@]} backups:"
for backup in "${found_backups[@]}"; do
basename "${backup%%.*}"
echo "- $(basename ${backup%%.*})"
done
}