From: Russ Cox Date: Wed, 27 Jul 2011 21:38:39 +0000 (-0400) Subject: build: fix for noclobber users X-Git-Tag: weekly.2011-07-29~39 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=db3088a37c3e4743183bc4c5934c1d4ebc3ca498;p=gostls13.git build: fix for noclobber users Fixes #2020. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/4814056 --- diff --git a/src/env.bash b/src/env.bash index f83012a266..a01a03e45c 100644 --- a/src/env.bash +++ b/src/env.bash @@ -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')