From c08f41eff171197ea217328db24982dd34466dc0 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 17 Oct 2006 13:08:57 +0000 Subject: [PATCH] implement sorting for menuconfig submenus git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5182 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- scripts/gen_menuconfig.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gen_menuconfig.pl b/scripts/gen_menuconfig.pl index fe0131092..c0279d545 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}) {