etcd/build
Brandon Philips aff4af1d0b fix(build): use /bin/sh
it seems to work with bash -o posix. Ship it.
2013-09-25 17:04:05 -07:00

26 lines
469 B
Bash
Executable File

#!/bin/sh
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
./scripts/release-version > release_version.go
go build "${ETCD_PACKAGE}"