go-ethereum/build/env.sh
Christopher Franko 85d410d34e move all the deps to the latest repo
This was over looked for so long because it was already taken care of in
the newer branches.
2017-03-20 09:11:55 -04:00

31 lines
712 B
Bash
Executable file

#!/bin/sh
set -e
if [ ! -f "build/env.sh" ]; then
echo "$0 must be run from the root of the repository."
exit 2
fi
# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/expanse-org"
if [ ! -L "$ethdir/go-expanse" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. go-expanse
cd "$root"
fi
# Set up the environment to use the workspace.
# Also add Godeps workspace so we build using canned dependencies.
GOPATH="$workspace"
export GOPATH
# Run the command inside the workspace.
cd "$ethdir/go-expanse"
PWD="$ethdir/go-expanse"
# Launch the arguments with the configured environment.
exec "$@"