mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 21:33:28 +01:00
Merge pull request #257 from thomas-negrault/fix/alphabetical-filenames-sorting
Sort filenames alphabetically when using the restore command
This commit is contained in:
@@ -78,7 +78,7 @@ fi
|
|||||||
get_filename() {
|
get_filename() {
|
||||||
COLUMNS=12
|
COLUMNS=12
|
||||||
prompt="Please select a file to restore:"
|
prompt="Please select a file to restore:"
|
||||||
options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
|
options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | sort -z | xargs -0) )
|
||||||
PS3="$prompt "
|
PS3="$prompt "
|
||||||
select opt in "${options[@]}" "Custom" "Quit" ; do
|
select opt in "${options[@]}" "Custom" "Quit" ; do
|
||||||
if (( REPLY == 2 + ${#options[@]} )) ; then
|
if (( REPLY == 2 + ${#options[@]} )) ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user