Merge branch '1968-monitor-disk-usage'
[arvados.git] / services / keep / build.sh
1 #! /bin/sh
2
3 # This script builds a Keep executable and installs it in
4 # ./bin/keep.
5 #
6 # In idiomatic Go style, a user would install Keep with something
7 # like:
8 #
9 #     go get arvados.org/keep
10 #     go install arvados.org/keep
11 #
12 # which would download both the Keep source and any third-party
13 # packages it depends on.
14 #
15 # Since the Keep source is bundled within the overall Arvados source,
16 # "go get" is not the primary tool for delivering Keep source and this
17 # process doesn't work.  Instead, this script sets the environment
18 # properly and fetches any necessary dependencies by hand.
19
20 if [ -z "$GOPATH" ]
21 then
22     GOPATH=$(pwd)
23 else
24     GOPATH=$(pwd):${GOPATH}
25 fi
26
27 export GOPATH
28
29 set -o errexit   # fail if any command returns an error
30
31 mkdir -p pkg
32 mkdir -p bin
33 go get github.com/gorilla/mux
34 go install keep
35 ls -l bin/keep
36 echo "success!"