Skip to content

Commit

Permalink
Update scripts/restore.sh
Browse files Browse the repository at this point in the history
- Modify the backup file listup code
- Sort by backup file name 
- Modify to show only file types in the list

Co-authored-by: Carlos Martinez <[email protected]>
  • Loading branch information
seoseonyu and Dashboy1998 authored Feb 1, 2024
1 parent 897d7ae commit 7a0cbc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ fi

# Show up backup list
echo "Backup List:"
select BACKUP_FILE in "$BACKUP_DIRECTORY_PATH"/*; do
mapfile -t BACKUP_FILES < <(find "$BACKUP_DIRECTORY_PATH" -type f -name "*.tar.gz" | sort)
select BACKUP_FILE in "${BACKUP_FILES[@]}"; do
if [ -n "$BACKUP_FILE" ]; then
echo "Selected backup: $BACKUP_FILE"
break
Expand Down

0 comments on commit 7a0cbc3

Please sign in to comment.