etcd/build
Brandon Philips 5f6d331e6a feat(third_party): use this directory
The third_party directory has all of the dependencies needed to build
etcd so that we can have a consistent build. `go get` should not be
called at any point during the build process.
2013-08-06 11:38:43 -07:00

25 lines
402 B
Bash
Executable File

#!/bin/bash
ETCD_PACKAGE=github.com/coreos/etcd
export GOPATH=${PWD}
SRC_DIR=$GOPATH/src
ETCD_DIR=$SRC_DIR/$ETCD_PACKAGE
ETCD_BASE=$(dirname ${ETCD_DIR})
if [ ! -d ${ETCD_BASE} ]; then
mkdir -p ${ETCD_BASE}
fi
if [ ! -h ${ETCD_DIR} ]; then
ln -s ../../../ ${ETCD_DIR}
fi
for i in third_party/*; do
if [ $i = "third_party/src" ]; then
continue
fi
cp -R $i src/
done
go build ${ETCD_PACKAGE}