Files
ostrich/tools/configFileBuilder.pl
2018-01-20 13:55:01 -06:00

19 lines
318 B
Perl
Executable File

while (<>)
{
next if (s/^cfg: // == 0);
chomp;
($section, $value) = /\[(.*)\] (.*)/;
$key{$section . "." . $value} = 1;
}
foreach (sort keys %key)
{
($section, $value) = split(/\./, $_, 2);
if ($section ne $oldSection)
{
$oldSection = $section;
print "[", $section, "]\n";
}
print "\t", $value, "\n";
}