mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +08:00
Improved sorting of the subvolumes list (#107)
* Improved sorting of the subvolumes list Add functionality to sort subvolume list by: rootid,gen,ogen,path Default: "-rootid" means list snapshot by new ones first See [Sorting section](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume#SUBCOMMAND)
This commit is contained in:
+1
-5
@@ -76,11 +76,7 @@ microcode=("${GRUB_BTRFS_CUSTOM_MICROCODE[@]}")
|
||||
## Limit snapshots to show in the Grub menu
|
||||
limit_snap_show="${GRUB_BTRFS_LIMIT:-50}"
|
||||
## How to sort snapshots list
|
||||
snap_list_sort=${GRUB_BTRFS_SUBVOLUME_SORT:-"descending"}
|
||||
case "${snap_list_sort}" in
|
||||
ascending) btrfssubvolsort=("--sort=+rootid");;
|
||||
*) btrfssubvolsort=("--sort=-rootid")
|
||||
esac
|
||||
btrfssubvolsort=(--sort="${GRUB_BTRFS_SUBVOLUME_SORT:-"-rootid"}")
|
||||
## Show snapshots found during run "grub-mkconfig"
|
||||
show_snap_found=${GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND:-"true"}
|
||||
## Show Total of snapshots found during run "grub-mkconfig"
|
||||
|
||||
Reference in New Issue
Block a user