diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2011-07-21 10:38:18 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 10:38:18 +0200 |
commit | 6f0156d40c3f8269d9fd6410f614755dc1bb14f4 (patch) | |
tree | 5b895e02100181399415958f11be73cf507539d0 /set_soenv.in | |
parent | ad8b32a9d1cdb2ce4b478c70879c29ece123479d (diff) |
revert some mismerges in set_soenv.in
Diffstat (limited to 'set_soenv.in')
-rwxr-xr-x | set_soenv.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/set_soenv.in b/set_soenv.in index 87ecc7633484..5ea6bbf03b09 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -1470,6 +1470,8 @@ $nmake = '"dmake"'; # VI. Open the output file. #-------------------------- # +open( OUT, ">$outfile" ) || + die "Cannot open $outfile: $!\n"; # #------------------------------------------ @@ -2075,6 +2077,7 @@ ToFile( "ZIPDEP", "zipdep.pl", "e" ); # # Writing the aliases to file. ToFile( "Aliases.", $empty, "c" ); +ToFile( "Don't set aliases when bootstrapping", $empty, "c" ); ToFile( "alias mkout", $mkout, "a" ); ToFile( "alias deliver", $deliver, "a" ); @@ -2085,7 +2088,6 @@ if ( $platform !~ m/cygwin/ ) { ToFile( "alias nmake", $nmake, "a" ); } - # on Solaris, MacOSX and FreeBSD, set GNUCOPY and GNUPATCH if ($platform =~ m/solaris|darwin|freebsd/) { @@ -2106,6 +2108,8 @@ print OUT "unset $unsetvars$newline"; # VIII. Closing output file. #--------------------------- # +close( OUT ) || print "Can't close $outfile: $!"; + # #------------------------------ # IX. Sourcing the output file. @@ -2264,6 +2268,7 @@ sub ToFile { $envvar =~ s/\\/\\\\/g; printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar) if ( '@VERBOSE@' eq 'TRUE' ); + print OUT "$_[ 0 ]=\"$envvar\"$newline"; # to sh file $exportvars .= " $_[ 0 ]"; # add to export list for sh file } else { @@ -2274,6 +2279,7 @@ sub ToFile { elsif ( $_[ 2 ] eq "a" ) { # Write an alias to file. print "The $_[ 0 ] is set to: $_[ 1 ]\n" if ( '@VERBOSE@' eq 'TRUE' ); # to stdout + print OUT "$_[ 0 ]=$_[ 1 ]$newline"; # to sh file } elsif ( $_[ 2 ] eq "c" ) { # Write a comment to file. @@ -2284,9 +2290,14 @@ sub ToFile { print "$comment $_[ 0 ]$newline"; print "$comment$newline"; } + print OUT "$newline"; + print OUT "$comment$newline"; + print OUT "$comment $_[ 0 ]$newline"; + print OUT "$comment$newline"; } elsif ( $_[ 2 ] eq "n" ) { #Write a newline to a file + print OUT "$newline"; } elsif ( $_[ 2 ] eq "z" ) { |