Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Added build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Gonyeo committed Jun 13, 2016
1 parent 656498c commit caf58dc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e

# Gets the directory that this script is stored in.
# https://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

ORG_PATH="github.com/appc"
REPO_PATH="${ORG_PATH}/acserver"

if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi

export GOBIN=${DIR}/bin
export GOPATH=${DIR}/Godeps/_workspace:${DIR}/gopath

eval $(go env)
export GOOS GOARCH

if [ "${GOOS}" = "freebsd" ]; then
# /usr/bin/cc is clang on freebsd, but we need to tell it to go to
# make it generate proper flavour of code that doesn't emit
# warnings.
export CC=clang
fi

echo "Building acserver..."
go build -o $GOBIN/acserver ${REPO_PATH}

0 comments on commit caf58dc

Please sign in to comment.