mirror of
https://github.com/torvalds/linux.git
synced 2026-08-05 14:59:58 +02:00
Currently, the idems inside media Kconfig are out of order.
Sort them using the script below:
<script>
use strict;
use warnings;
my %config;
my @source;
my $out;
sub flush_config()
{
if (scalar %config) {
for my $c (sort keys %config) {
$out .= $config{$c} . "\n";
}
%config = ();
}
return if (!scalar @source);
$out .= "\n";
for my $s (sort @source) {
$out .= $s;
}
$out .= "\n";
@source = ();
}
sub sort_kconfig($)
{
my $fname = shift;
my $cur_config = "";
@source = ();
$out = "";
%config = ();
open IN, $fname or die;
while (<IN>) {
if (m/^config\s+(.*)/) {
$cur_config = $1;
$config{$cur_config} .= $_;
} elsif (m/^source\s+(.*)/) {
push @source, $_;
} elsif (m/^\s+/) {
if ($cur_config eq "") {
$out .= $_;
} else {
$config{$cur_config} .= $_;
}
} else {
flush_config();
$cur_config = "";
$out .= $_;
}
}
close IN or die;
flush_config();
$out =~ s/\n\n+/\n\n/g;
$out =~ s/\n+$/\n/;
open OUT, ">$fname";
print OUT $out;
close OUT;
}
for my $fname(@ARGV) {
sort_kconfig $fname
}
</script>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
||
|---|---|---|
| .. | ||
| b2c2 | ||
| bt8xx | ||
| cobalt | ||
| cx18 | ||
| cx88 | ||
| cx23885 | ||
| cx25821 | ||
| ddbridge | ||
| dm1105 | ||
| dt3155 | ||
| intel | ||
| ivtv | ||
| mantis | ||
| meye | ||
| netup_unidvb | ||
| ngene | ||
| pluto2 | ||
| pt1 | ||
| pt3 | ||
| saa7134 | ||
| saa7146 | ||
| saa7164 | ||
| smipcie | ||
| solo6x10 | ||
| sta2x11 | ||
| ttpci | ||
| tw68 | ||
| tw686x | ||
| tw5864 | ||
| Kconfig | ||
| Makefile | ||