diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-17 13:08:57 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-17 13:08:57 +0000 |
commit | 20e75631a1b5069aa26420e334a5505b3d9261ca (patch) | |
tree | 30206fa7a4be9b6d5917e50f7cd725efd0447086 | |
parent | ba5a7a6f83127cf0bf3a28898b05a827c6392159 (diff) | |
download | mtk-20170518-20e75631a1b5069aa26420e334a5505b3d9261ca.zip mtk-20170518-20e75631a1b5069aa26420e334a5505b3d9261ca.tar.gz mtk-20170518-20e75631a1b5069aa26420e334a5505b3d9261ca.tar.bz2 |
implement sorting for menuconfig submenus
SVN-Revision: 5182
-rwxr-xr-x | scripts/gen_menuconfig.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/gen_menuconfig.pl b/scripts/gen_menuconfig.pl index fe01310..c0279d5 100755 --- a/scripts/gen_menuconfig.pl +++ b/scripts/gen_menuconfig.pl @@ -34,7 +34,10 @@ sub print_category($) { print "menu \"$cat\"\n\n"; my %spkg = %{$category{$cat}}; foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) { - foreach my $pkg (@{$spkg{$spkg}}) { + my @pkgs = sort { + $a->{submenu}."->".$a->{name} cmp $b->{submenu}."->".$b->{name} + } @{$spkg{$spkg}}; + foreach my $pkg (@pkgs) { if ($cur_menu ne $pkg->{submenu}) { close_submenu(); if ($pkg->{submenu}) { |