From: Felix Fietkau Date: Tue, 17 Oct 2006 13:08:57 +0000 (+0000) Subject: implement sorting for menuconfig submenus X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20e75631a1b5069aa26420e334a5505b3d9261ca;p=openwrt%2Fstaging%2Fmkresin.git implement sorting for menuconfig submenus SVN-Revision: 5182 --- diff --git a/scripts/gen_menuconfig.pl b/scripts/gen_menuconfig.pl index fe01310928..c0279d5452 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}) {