]> Cypherpunks repositories - gostls13.git/commitdiff
build: fix for noclobber users
authorRuss Cox <rsc@golang.org>
Wed, 27 Jul 2011 21:38:39 +0000 (17:38 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 27 Jul 2011 21:38:39 +0000 (17:38 -0400)
Fixes #2020.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4814056

src/env.bash

index f83012a2668fda2284a758485d3edbe2598f5eaa..a01a03e45c1da313761cd84d24b97a9a65619624 100644 (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')