github.com/q45/go@v0.0.0-20151101211701-a4fb8c13db3f/src/cmd/compile/internal/big/vendor.bash (about) 1 #!/usr/bin/env bash 2 3 # Copyright 2015 The Go Authors. All rights reserved. 4 # Use of this source code is governed by a BSD-style 5 # license that can be found in the LICENSE file. 6 7 # Run this script to obtain an up-to-date vendored version of math/big. 8 9 BIGDIR=../../../../math/big 10 11 # Start from scratch. 12 rm *.go 13 14 # We don't want any assembly files. 15 cp $BIGDIR/*.go . 16 17 # Use pure Go arith ops w/o build tag. 18 sed 's|^// \+build math_big_pure_go$||' arith_decl_pure.go > arith_decl.go 19 rm arith_decl_pure.go 20 21 # Import vendored math/big in external tests (e.g., floatexample_test.go). 22 for f in *_test.go; do 23 sed 's|"math/big"|"cmd/compile/internal/big"|' $f > foo.go 24 mv foo.go $f 25 done 26 27 # gofmt to clean up after sed 28 gofmt -w . 29 30 # Test that it works 31 go test -short