summaryrefslogtreecommitdiff
path: root/src/quietgcc.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-07-28 13:04:52 -0400
committerRuss Cox <rsc@golang.org>2011-07-28 13:04:52 -0400
commitf9ff2bdcd9b752cb1545199c68d3c01b673ab670 (patch)
tree2b2577da64d944f48eae4a335c60b94ef84f2e7c /src/quietgcc.bash
parent6a371443812b4207fa9471d241eb08ddd87c58fb (diff)
downloadgo-f9ff2bdcd9b752cb1545199c68d3c01b673ab670.tar.gz
build: handle spaces in $USER
Fixes issue 2107. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/4830042
Diffstat (limited to 'src/quietgcc.bash')
-rwxr-xr-xsrc/quietgcc.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quietgcc.bash b/src/quietgcc.bash
index c99305eda..759f6b407 100755
--- a/src/quietgcc.bash
+++ b/src/quietgcc.bash
@@ -32,13 +32,13 @@ case "$(uname -m -p)-$GOHOSTARCH" in
esac
# Run gcc, save error status, redisplay output without noise, exit with gcc status.
-tmp=${TMPDIR:-/tmp}/quietgcc.$$.$USER.out
+tmp="${TMPDIR:-/tmp}/quietgcc.$$.$USER.out"
$gcc -Wall -Wno-sign-compare -Wno-missing-braces \
-Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \
-Werror \
- "$@" >$tmp 2>&1
+ "$@" >"$tmp" 2>&1
status=$?
-egrep -v "$ignore" $tmp | uniq | tee $tmp.1
+egrep -v "$ignore" "$tmp" | uniq | tee "$tmp.1"
-rm -f $tmp $tmp.1
+rm -f "$tmp" "$tmp.1"
exit $status