build 421 B

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