#/usr/bin/perl

use strict;
use warnings;

open(my $ofh, ">JL_HELL/config") or die($!);

print $ofh "DIR=ADDON\n";
print $ofh "DIR=ADDON/JL_HELL\n";

my @fnames = `find jl_hell -type f`;

foreach my $fname (@fnames) {
	chomp $fname;

	next if($fname =~ /(\.svn|config)/);

	print "-- $fname\n";

	my $nfname = $fname;
	$fname =~ s/^jl_hell\///go;
	$nfname =~ s/^jl_hell\//ADDON\/JL_HELL\//go;

	print $ofh "FILE=$fname|$nfname\n";
}

print $ofh "REGISTERADDON=JL Hell|Welcome to Hell|JL_HELL\n";
print $ofh "REGISTERMUSIC=Hells Gate|ADDON/JL_HELL/Hells_gate.ogg|\"Hells Gate\" is the first composition of Joerg Ladenhauf, our teams new level designer. He choose to go to a more doom-themes approach for his first add-on, creating a really \"hot\" gaming experience.\n";
print $ofh "REGISTERMUSIC=Blink 5|ADDON/JL_HELL/BLINK_5.ogg|Another background music from Joerg Ladenhauf\n";

close($ofh);
