Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-05 Thread Mathieu Desnoyers
- On May 5, 2022, at 9:53 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On May 4, 2022, at 11:24 AM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On May 4, 2022, at 10:43 AM, Robbie Harwood rharw...@redhat.com wrote: >> >>> Mathieu Desnoyers wr

Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-05 Thread Mathieu Desnoyers
- On May 4, 2022, at 11:24 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On May 4, 2022, at 10:43 AM, Robbie Harwood rharw...@redhat.com wrote: > >> Mathieu Desnoyers writes: >> >>> +version_reverse_sort () >>> +{ >>> + case $version_reverse_sort_sort_has_v in >>

Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-04 Thread Mathieu Desnoyers
- On May 4, 2022, at 10:43 AM, Robbie Harwood rharw...@redhat.com wrote: > Mathieu Desnoyers writes: > >> +version_reverse_sort () >> +{ >> + case $version_reverse_sort_sort_has_v in > > Does this need to be its own variable, or could it just reuse > version_sort_sort_has_v? We could do t

Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-04 Thread Robbie Harwood
Mathieu Desnoyers writes: > +version_reverse_sort () > +{ > + case $version_reverse_sort_sort_has_v in Does this need to be its own variable, or could it just reuse version_sort_sort_has_v? > +reverse_sorted_list=$(echo $list | tr ' ' '\n' | sed 's/$/ 2/' | sed > 's/\.old 2/ 1/' | version_rev