Files
dockerized-swg/gameserver/utils/tools/configFileBuilder.pl
2018-01-11 21:02:00 -05: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";
}