flash-gui: clean up ROM list

Exclude dot folders from ROM search path, so that files in
.Trash (eg) aren't shown. Sort the remaining options.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2019-05-18 20:02:05 -05:00
parent e0e0019250
commit 3306dbb66d
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

View File

@ -88,7 +88,7 @@ while true; do
--yesno "This requires you insert a USB drive containing:\n* Your BIOS image (*.rom)\n\nAfter you select this file, this program will reflash your BIOS\n\nDo you want to proceed?" 16 90) then --yesno "This requires you insert a USB drive containing:\n* Your BIOS image (*.rom)\n\nAfter you select this file, this program will reflash your BIOS\n\nDo you want to proceed?" 16 90) then
mount_usb mount_usb
if grep -q /media /proc/mounts ; then if grep -q /media /proc/mounts ; then
find /media -name '*.rom' > /tmp/filelist.txt find /media ! -path '*/\.*' -type f -name '*.rom' | sort > /tmp/filelist.txt
file_selector "/tmp/filelist.txt" "Choose the ROM to flash" file_selector "/tmp/filelist.txt" "Choose the ROM to flash"
if [ "$FILE" == "" ]; then if [ "$FILE" == "" ]; then
return return