You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
718 B
24 lines
718 B
4 years ago
|
#!/bin/sh
|
||
|
set -eu
|
||
|
|
||
|
version_bootstrap=20171003
|
||
|
|
||
|
dir_download="$PWD/download"
|
||
|
mkdir -p build; cd build
|
||
|
dir_install="$PWD/install-bootstrap"
|
||
|
|
||
|
# Prepare source
|
||
|
mkdir -p "go1.4-bootstrap-$version_bootstrap"
|
||
|
tar xf "$dir_download/go1.4-bootstrap-$version_bootstrap.tar.gz" -C "go1.4-bootstrap-$version_bootstrap" --strip-components 1
|
||
|
cd "go1.4-bootstrap-$version_bootstrap"
|
||
|
|
||
|
# Build and install
|
||
|
(cd src; ./make.bash)
|
||
|
rm -rf pkg/obj src/cmd src/internal src/builtin
|
||
|
find src -type f \( ! -name "*.go" \) -delete
|
||
|
find src -type f \( -name "*_test.go" -o -name "*_test_*.go" \) -delete
|
||
|
find src -type d -name "testdata" -exec rm -r {} +
|
||
|
find src -type d -empty -delete
|
||
|
mkdir -p "$dir_install"
|
||
|
cp -at "$dir_install" bin pkg src
|