installer: make rewrite-config.PL change only defined parameters

Previously, it tried to slurp up all text between two
occurences of '__'
This commit is contained in:
Galen Charlton 2007-12-13 14:08:16 -06:00
parent 8b75eae887
commit 1df0f05ac7
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ foreach $key (keys %configuration) {
$fname = $ARGV[0];
$file = read_file($fname);
$file =~ s/__.*?__/$configuration{$&}/seg;
$file =~ s/__.*?__/exists $configuration{$&} ? $configuration{$&} : $&/seg;
chmod 0644, $fname;
open(OUTPUT,">$fname") || die "Can't open $fname for write: $!";
print OUTPUT $file;