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.
32 lines
885 B
32 lines
885 B
#!/bin/sh
|
|
set -eu
|
|
|
|
version_bootstrap=20171003
|
|
|
|
dir_download="$PWD/download"
|
|
mkdir -p build; cd build
|
|
dir_install="$PWD/install-go1.4"
|
|
|
|
# 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)
|
|
|
|
find src -type f \( ! -name '*.go' \
|
|
-a ! -name '*.c' \
|
|
-a ! -name '*.h' \
|
|
-a ! -name '*.s' \
|
|
-a ! -name '*.S' \
|
|
-a ! -name 'p256_asm_table.bin' \
|
|
\) -print -delete
|
|
find src -type f -name '*_test.go' -print -delete
|
|
find src -type d -name 'testdata' -print0 | xargs -0 rm -vrf
|
|
find src -type d -empty -print -delete
|
|
find pkg -type f -name '*.a' -print -delete
|
|
find pkg -type d -empty -print -delete
|
|
|
|
mkdir -p "$dir_install"
|
|
cp -at "$dir_install" bin pkg src
|
|
|