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:
parent
8b75eae887
commit
1df0f05ac7
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue