scripts/build-self-contained
raw| 1 | #!/bin/bash |
| 2 | # This is a self contained shell script for building jp without having to set |
| 3 | # up GOPATH. You just need go installed. |
| 4 | tempdir="$(mktemp -d -t jpbuild)" |
| 5 | tempgopath="$tempdir/go" |
| 6 | jppath="${tempgopath}/src/github.com/jmespath" |
| 7 | fakerepo="$jppath/jp" |
| 8 | mkdir -p $jppath |
| 9 | ln -s "$(pwd)" "$jppath/jp" |
| 10 | export GOPATH="$tempgopath" |
| 11 | cd "$fakerepo" |
| 12 | go build |