forked from extern/shorewall_code
Add Cygwin-specific code in get_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3873ebe06a
commit
239560be8d
@ -5147,6 +5147,7 @@ sub unsupported_yes_no_warning( $ ) {
|
|||||||
#
|
#
|
||||||
sub get_params( $ ) {
|
sub get_params( $ ) {
|
||||||
my $export = $_[0];
|
my $export = $_[0];
|
||||||
|
my $cygwin = ( $shorewallrc{HOST} eq 'cygwin' );
|
||||||
|
|
||||||
my $fn = find_file 'params';
|
my $fn = find_file 'params';
|
||||||
|
|
||||||
@ -5189,7 +5190,9 @@ sub get_params( $ ) {
|
|||||||
|
|
||||||
for ( @params ) {
|
for ( @params ) {
|
||||||
chomp;
|
chomp;
|
||||||
if ( /^declare -x (.*?)="(.*[^\\])"$/ ) {
|
if ( $cygwin && /^declare -x (.*?)="(.*)"$/ ) {
|
||||||
|
$params{$1} = $2 unless $1 eq '_';
|
||||||
|
} elsif ( /^declare -x (.*?)="(.*[^\\])"$/ ) {
|
||||||
$params{$1} = $2 unless $1 eq '_';
|
$params{$1} = $2 unless $1 eq '_';
|
||||||
} elsif ( /^declare -x (.*?)="(.*)$/ ) {
|
} elsif ( /^declare -x (.*?)="(.*)$/ ) {
|
||||||
$params{$variable=$1} = $2 eq '"' ? '' : "${2}\n";
|
$params{$variable=$1} = $2 eq '"' ? '' : "${2}\n";
|
||||||
@ -5217,7 +5220,9 @@ sub get_params( $ ) {
|
|||||||
|
|
||||||
for ( @params ) {
|
for ( @params ) {
|
||||||
chomp;
|
chomp;
|
||||||
if ( /^export (.*?)="(.*[^\\])"$/ ) {
|
if ( $cygwin && /^export (.*?)="(.*)"$/ ) {
|
||||||
|
$params{$1} = $2 unless $1 eq '_';
|
||||||
|
} elsif ( /^export (.*?)="(.*[^\\])"$/ ) {
|
||||||
$params{$1} = $2 unless $1 eq '_';
|
$params{$1} = $2 unless $1 eq '_';
|
||||||
} elsif ( /^export (.*?)="(.*)$/ ) {
|
} elsif ( /^export (.*?)="(.*)$/ ) {
|
||||||
$params{$variable=$1} = $2 eq '"' ? '' : "${2}\n";
|
$params{$variable=$1} = $2 eq '"' ? '' : "${2}\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user