build
raw| 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | ORG_PATH="github.com/coreos" |
| 5 | REPO_PATH="${ORG_PATH}/go-iptables" |
| 6 | |
| 7 | if [ ! -h gopath/src/${REPO_PATH} ]; then |
| 8 | mkdir -p gopath/src/${ORG_PATH} |
| 9 | ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 |
| 10 | fi |
| 11 | |
| 12 | export GOBIN=${PWD}/bin |
| 13 | export GOPATH=${PWD}/gopath |
| 14 | |
| 15 | eval $(go env) |
| 16 | |
| 17 | if [ ${GOOS} = "linux" ]; then |
| 18 | echo "Building go-iptables..." |
| 19 | go build ${REPO_PATH}/iptables |
| 20 | else |
| 21 | echo "Not on Linux" |
| 22 | fi |