go-ethereum/build/env.sh
2018-04-28 13:05:13 +07:00

25 lines
543 B
Bash
Executable file

#!/bin/sh
set -e
# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/ethereum"
if [ ! -L "$ethdir/go-etherfact" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. go-etherfact
cd "$root"
fi
# Set up the environment to use the workspace.
GOPATH="$workspace"
export GOPATH
# Run the command inside the workspace.
cd "$ethdir/go-etherfact"
PWD="$ethdir/go-etherfact"
# Launch the arguments with the configured environment.
exec "$@"