-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
69 lines (61 loc) · 1.43 KB
/
build.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
set -e
if [ -z "$GOPATH" ]; then
GOPATH=`pwd`
fi
if [ -z "$STF_QUEUE_TYPE" ]; then
STF_QUEUE_TYPE=q4m
fi
if [ -z "$CC" ]; then
if [ -x "/usr/local/bin/gcc-4.7" ]; then
export CC=/usr/local/bin/gcc-4.7
fi
fi
export GOPATH
if [ -z "$SKIP_DEPS" ]; then
DEPS="
code.google.com/p/gcfg
github.com/bradfitz/gomemcache/memcache
github.com/braintree/manners
github.com/dustin/randbo
github.com/go-sql-driver/mysql
github.com/lestrrat/go-apache-logformat
github.com/lestrrat/go-file-rotatelogs
github.com/lestrrat/go-server-starter-listener
github.com/lestrrat/go-tcptest
github.com/lestrrat/go-test-mysqld
github.com/vmihailenco/msgpack
github.com/vmihailenco/redis/v2
"
for dep in $DEPS; do
OIFS=$IFS
IFS=':'
for path in $GOPATH; do
if [ ! -e $path/src/$dep ]; then
echo " + fetching $dep..."
go get $dep
fi
done
IFS=$OIFS
done
fi
WORKERS="
delete_object
repair_object
replicate_object
storage_health
"
for executable in $WORKERS; do
echo "Building in bin/stf-worker-$executable"
go build -tags $STF_QUEUE_TYPE -o bin/stf-worker-$executable cli/stf-worker-$executable/stf-worker-$executable.go
done
EXECUTABLES="
stf-worker
dispatcher
storage
"
for executable in $EXECUTABLES; do
echo "Building bin/$executable"
go build -tags $STF_QUEUE_TYPE -o bin/$executable cli/$executable/$executable.go
done
echo "Build done"