set_soenv.in (c0ecde16) | set_soenv.in (ade3f226) |
---|---|
1#!@PERL@ -w 2# 3############################################################### 4# 5# Licensed to the Apache Software Foundation (ASF) under one 6# or more contributor license agreements. See the NOTICE file 7# distributed with this work for additional information 8# regarding copyright ownership. The ASF licenses this file --- 1522 unchanged lines hidden (view full) --- 1531 die "Cannot open $outfile_sh: $!\n"; 1532 1533if(defined($outfile_bat)) 1534{ # Create bat environment file 1535 open( OUT_BAT, ">$outfile_bat" ) || 1536 die "Cannot open $outfile_bat: $!\n"; 1537} 1538 | 1#!@PERL@ -w 2# 3############################################################### 4# 5# Licensed to the Apache Software Foundation (ASF) under one 6# or more contributor license agreements. See the NOTICE file 7# distributed with this work for additional information 8# regarding copyright ownership. The ASF licenses this file --- 1522 unchanged lines hidden (view full) --- 1531 die "Cannot open $outfile_sh: $!\n"; 1532 1533if(defined($outfile_bat)) 1534{ # Create bat environment file 1535 open( OUT_BAT, ">$outfile_bat" ) || 1536 die "Cannot open $outfile_bat: $!\n"; 1537} 1538 |
1539open( OUT_PROPS, ">ant.properties" ) || 1540 die "Cannot open ant.properties: $!\n"; 1541 |
|
1539# 1540#------------------------------------------ 1541# VII. Writing the data to the output file. 1542#------------------------------------------ 1543# 1544# Write file header. 1545CreateFileHeader( *OUT_SH, $UPD, $platform, "sh/bash/ksh", "#" ); 1546CreateFileHeader( *OUT_BAT, $UPD, $platform, "4nt", "rem" ) if defined($outfile_bat); --- 547 unchanged lines hidden (view full) --- 2094} 2095 2096# 2097#--------------------------- 2098# VIII. Closing output file. 2099#--------------------------- 2100# 2101close( OUT_SH ) || print "Can't close $outfile_sh: $!"; | 1542# 1543#------------------------------------------ 1544# VII. Writing the data to the output file. 1545#------------------------------------------ 1546# 1547# Write file header. 1548CreateFileHeader( *OUT_SH, $UPD, $platform, "sh/bash/ksh", "#" ); 1549CreateFileHeader( *OUT_BAT, $UPD, $platform, "4nt", "rem" ) if defined($outfile_bat); --- 547 unchanged lines hidden (view full) --- 2097} 2098 2099# 2100#--------------------------- 2101# VIII. Closing output file. 2102#--------------------------- 2103# 2104close( OUT_SH ) || print "Can't close $outfile_sh: $!"; |
2105close( OUT_PROPS ) || print "Can't close ant.properties: $!"; |
|
2102 2103if( defined($outfile_bat)) 2104{ close( OUT_BAT ) || print "Can't close $outfile_bat: $!"; 2105} 2106 2107# 2108#------------------------------ 2109# IX. Sourcing the output file. --- 188 unchanged lines hidden (view full) --- 2298 # $envvar = $win_format_var; 2299 #} 2300 } 2301 2302 # Tcsh/bash needs backslashes quoted 2303 $envvar =~ s/\\/\\\\/g; 2304 $envvarbash = $envvar; 2305 | 2106 2107if( defined($outfile_bat)) 2108{ close( OUT_BAT ) || print "Can't close $outfile_bat: $!"; 2109} 2110 2111# 2112#------------------------------ 2113# IX. Sourcing the output file. --- 188 unchanged lines hidden (view full) --- 2302 # $envvar = $win_format_var; 2303 #} 2304 } 2305 2306 # Tcsh/bash needs backslashes quoted 2307 $envvar =~ s/\\/\\\\/g; 2308 $envvarbash = $envvar; 2309 |
2310 my $antvar = $envvarbash; 2311 $antvar =~ s/(\$\{?\w+\}?)/$1/eeg ; 2312 |
|
2306 if ($platform =~ m/os2/) { 2307 # expand the variables 2308 $envvar =~ s/(\$\{?\w+\}?)/$1/eeg ; 2309 if ($_[ 0 ] =~ /^PATH$|^BEGINLIBPATH$/) { 2310 # always use \ for them 2311 $envvar =~ s/\//\\/g ; 2312 } 2313 $win_format_var = $envvar; 2314 } 2315 2316 printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar); 2317 print OUT_SH "$_[ 0 ]=\"$envvarbash\"$newline"; # to sh file 2318 $exportvars .= " $_[ 0 ]"; # add to export list for sh file | 2313 if ($platform =~ m/os2/) { 2314 # expand the variables 2315 $envvar =~ s/(\$\{?\w+\}?)/$1/eeg ; 2316 if ($_[ 0 ] =~ /^PATH$|^BEGINLIBPATH$/) { 2317 # always use \ for them 2318 $envvar =~ s/\//\\/g ; 2319 } 2320 $win_format_var = $envvar; 2321 } 2322 2323 printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar); 2324 print OUT_SH "$_[ 0 ]=\"$envvarbash\"$newline"; # to sh file 2325 $exportvars .= " $_[ 0 ]"; # add to export list for sh file |
2326 print OUT_PROPS "$_[ 0 ]=$antvar$newline"; # to Ant properties file |
|
2319 2320 if(defined($outfile_bat)) { 2321 print OUT_BAT "IF DEFINED $_[ 0 ] $unset $_[ 0 ]$newline"; 2322 print OUT_BAT "$set $_[ 0 ]=$win_format_var$newline"; 2323 } 2324 2325 } else { 2326 printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout --- 349 unchanged lines hidden --- | 2327 2328 if(defined($outfile_bat)) { 2329 print OUT_BAT "IF DEFINED $_[ 0 ] $unset $_[ 0 ]$newline"; 2330 print OUT_BAT "$set $_[ 0 ]=$win_format_var$newline"; 2331 } 2332 2333 } else { 2334 printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout --- 349 unchanged lines hidden --- |