File: all.sh

package info (click to toggle)
golang-github-neelance-astrewrite 0.0~git20160511.0.9934826-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 112 kB
  • sloc: sh: 18; makefile: 5
file content (27 lines) | stat: -rwxr-xr-x 605 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e

export CGO_ENABLED=0

rm -rf goroot
mkdir goroot
ln -s $(go env GOROOT)/test goroot/test
ln -s $(go env GOROOT)/lib goroot/lib

cp -r $(go env GOROOT)/src goroot/src

mkdir goroot/pkg
ln -s $(go env GOROOT)/pkg/tool goroot/pkg/tool
ln -s $(go env GOROOT)/pkg/include goroot/pkg/include

PACKAGES=$(cd $(go env GOROOT)/src; go list ./... | egrep -v "runtime|builtin|cmd|sync")

go build rewrite_package.go
for pkg in $PACKAGES; do
	echo $pkg
	./rewrite_package $pkg
done

env GOROOT=$PWD/goroot $(which go) install -v $PACKAGES

env GOROOT=$PWD/goroot $(which go) test -short $PACKAGES