mirror of
https://github.com/golang/go
synced 2024-10-05 06:11:21 -06:00
31 lines
716 B
Bash
31 lines
716 B
Bash
|
#!/bin/sh
|
||
|
# Copyright 2011 The Go Authors. All rights reserved.
|
||
|
# Use of this source code is governed by a BSD-style
|
||
|
# license that can be found in the LICENSE file.
|
||
|
|
||
|
. ./buildinfo.sh
|
||
|
|
||
|
for sys in $GOOSARCHES
|
||
|
do
|
||
|
export GOOS=$(echo $sys | sed 's/_.*//')
|
||
|
export GOARCH=$(echo $sys | sed 's/.*_//')
|
||
|
targ=buildscript_${GOOS}_$GOARCH.sh
|
||
|
rm -f $targ
|
||
|
|
||
|
(echo '#!/bin/bash
|
||
|
# AUTO-GENERATED by buildscript.sh; DO NOT EDIT.
|
||
|
# This script builds the go command (written in Go),
|
||
|
# and then the go command can build the rest of the tree.
|
||
|
|
||
|
export GOOS='$GOOS'
|
||
|
export GOARCH='$GOARCH'
|
||
|
export WORK=$(mktemp -d -t go-build)
|
||
|
trap "rm -rf $WORK" EXIT SIGINT SIGTERM
|
||
|
set -e
|
||
|
|
||
|
'
|
||
|
go install -a -n cmd/go
|
||
|
)>$targ
|
||
|
chmod +x $targ
|
||
|
done
|