mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 20:19:19 +01:00
More parameter processing improvements
This commit is contained in:
parent
901a986b18
commit
22580c5be0
@ -2905,9 +2905,24 @@ sub get_params() {
|
||||
|
||||
fatal_error "Processing of $fn failed" if $?;
|
||||
|
||||
my $variable;
|
||||
|
||||
for ( @params ) {
|
||||
if ( /^export (.*?)='(.*)'$/ ) {
|
||||
$params{$1} = $2 unless $1 eq '_';
|
||||
} elsif ( /^export (.*?)='(.*)$/ ) {
|
||||
$params{$variable=$1}="${2}\n";
|
||||
} else {
|
||||
assert($variable);
|
||||
$params{$variable} .= $_;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $debug ) {
|
||||
print "PARAMS:\n";
|
||||
my $value;
|
||||
while ( ($variable, $value ) = each %params ) {
|
||||
print " $variable='$value'\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user