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,11 +2905,26 @@ sub get_params() {
|
|||||||
|
|
||||||
fatal_error "Processing of $fn failed" if $?;
|
fatal_error "Processing of $fn failed" if $?;
|
||||||
|
|
||||||
|
my $variable;
|
||||||
|
|
||||||
for ( @params ) {
|
for ( @params ) {
|
||||||
if ( /^export (.*?)='(.*)'$/ ) {
|
if ( /^export (.*?)='(.*)'$/ ) {
|
||||||
$params{$1} = $2 unless $1 eq '_';
|
$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