installer: adjusted conditional for setting exported variables

Now checks for win32, and assumes (for now) a default
for all other platforms.
This commit is contained in:
Galen Charlton 2007-12-18 14:53:47 -06:00
parent ffea1e0832
commit d18a80820a

View file

@ -1168,19 +1168,19 @@ sub postamble {
$config{'ZEBRA_PASS'} =~ s/\$/\$\$/g; $config{'ZEBRA_PASS'} =~ s/\$/\$\$/g;
# Hereagain, we must alter syntax per platform... # Hereagain, we must alter syntax per platform...
if ( $^O =~ /linux|cygwin/ ) { if ( $^O eq 'MSWin32' ) {
my $env = join("\n", map { "export __${_}__ := $target_directories->{$_}" } keys %$target_directories);
$env .= "\n\n";
$env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);
return "$env\n";
}
elsif ( $^O eq 'MSWin32' ) {
# NOTE: it is imperative that there be no whitespaces in ENV=value... # NOTE: it is imperative that there be no whitespaces in ENV=value...
my $env = join("\n", map { "__${_}__=$target_directories->{$_}" } keys %$target_directories); my $env = join("\n", map { "__${_}__=$target_directories->{$_}" } keys %$target_directories);
$env .= "\n\n"; $env .= "\n\n";
$env .= join("\n", map { "__${_}__=$config{$_}" } keys %config); $env .= join("\n", map { "__${_}__=$config{$_}" } keys %config);
return "$env\n"; return "$env\n";
} }
else {
my $env = join("\n", map { "export __${_}__ := $target_directories->{$_}" } keys %$target_directories);
$env .= "\n\n";
$env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);
return "$env\n";
}
} }