Commit a9b92013 authored by Russ Cox's avatar Russ Cox

buildscript: make script safer, same output on Windows

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5502062
parent 0509727b
......@@ -24,7 +24,17 @@ trap "rm -rf $WORK" EXIT SIGINT SIGTERM
set -e
'
go install -a -n cmd/go
# Save script printed by go install but make shell safe
# by quoting variable expansions. On Windows, rewrite
# \ paths into / paths. This avoids the \ being interpreted
# as a shell escape but also makes sure that we generate the
# same scripts on Unix and Windows systems.
go install -a -n cmd/go | sed '
s/$GOBIN/"$GOBIN"/g
s/$GOROOT/"$GOROOT"/g
s/$WORK/"$WORK"/g
s;\\;/;g
'
)>$targ
chmod +x $targ
done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment