1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:24:50 -07:00

build: fix for noclobber users

Fixes #2020.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4814056
This commit is contained in:
Russ Cox 2011-07-27 17:38:39 -04:00
parent a84abbe508
commit db3088a37c

View File

@ -88,6 +88,11 @@ if bison --version 2>&1 | grep 'bison++' >/dev/null 2>&1; then
exit 1
fi
# Issue 2020: some users configure bash to default to
# set +o noclobber
# which makes >x fail if x already exists. Restore sanity.
set -o noclobber
# Tried to use . <($MAKE ...) here, but it cannot set environment
# variables in the version of bash that ships with OS X. Amazing.
eval $($MAKE --no-print-directory -f Make.inc go-env | egrep 'GOARCH|GOOS|GOHOSTARCH|GOHOSTOS|GO_ENV')