Skip to content

Commit

Permalink
scripts: case insensitive sort device names
Browse files Browse the repository at this point in the history
When selecting devices from the Target Devices menu, the brand choices
of naming makes it confusing to find particular devices by name, as the
sorting is case sensitve.  AirTight came after ALFA, and devolo and
jjPlus both came after Zyxel.

This does _not_ apply to the Target Profile list, as that includes
"Default - all profiles" inside the profile list.

Signed-off-by: Karl Palsson <[email protected]>
  • Loading branch information
karlp authored and blogic committed Oct 15, 2016
1 parent 5dc56b4 commit c511795
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/target-metadata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,12 @@ ()
EOF
foreach my $target (@target) {
my $profiles = $target->{profiles};
foreach my $profile (@{$target->{profiles}}) {
my @profiles = sort {
my $x = $a->{name};
my $y = $b->{name};
"\L$x" cmp "\L$y";
} @{$target->{profiles}};
foreach my $profile (@profiles) {
next unless $profile->{id} =~ /^DEVICE_/;
print <<EOF;
menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
Expand Down

0 comments on commit c511795

Please sign in to comment.