add check for available backups
This commit is contained in:
parent
4a956a45bc
commit
4e72971d7f
1 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,11 @@ function backup_list() {
|
|||
local backupdir="$(getValueByKey 'PODMAN_DIRECTORY')/${1}/backup"
|
||||
local found_backups=($(find "$backupdir" -type f -print))
|
||||
|
||||
if [[ "${#found_backups[@]}" -eq 0 ]]; then
|
||||
log i "No backups found for '$1'"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log i "Found ${#found_backups[@]} backups:"
|
||||
for backup in "${found_backups[@]}"; do
|
||||
echo "- $(basename ${backup%%.*})"
|
||||
|
|
Loading…
Reference in a new issue