diff options
author | Karl Palsson <karlp@etactica.com> | 2016-10-12 13:51:23 +0000 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-10-15 11:36:51 +0200 |
commit | c511795f47ddbe7413e07a499f7ff59715ed088a (patch) | |
tree | d25b272d1994b714b8b5cfb9bc79c1add2a7ac4f /scripts/target-metadata.pl | |
parent | 5dc56b4123098dbea5e62053fc8c6c154be526b1 (diff) | |
download | mtk-20170518-c511795f47ddbe7413e07a499f7ff59715ed088a.zip mtk-20170518-c511795f47ddbe7413e07a499f7ff59715ed088a.tar.gz mtk-20170518-c511795f47ddbe7413e07a499f7ff59715ed088a.tar.bz2 |
scripts: case insensitive sort device names
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 <karlp@etactica.com>
Diffstat (limited to 'scripts/target-metadata.pl')
-rwxr-xr-x | scripts/target-metadata.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index 3422572..7f7dc6d 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -276,8 +276,12 @@ menu "Target Devices" 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} |