go-ethereum/build/env.sh
David Krett fc5111bb3b Rename of Imports To Reflect New RepoName
Refactor References to “ethereum/go-ethereum” to “ShyftNetwork/go-empyrean”
2018-07-22 20:40:07 -04:00

30 lines
650 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/ShyftNetwork"
if [ ! -L "$ethdir/go-empyrean" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. go-empyrean
cd "$root"
fi
# Set up the environment to use the workspace.
GOPATH="$workspace"
export GOPATH
# Run the command inside the workspace.
cd "$ethdir/go-empyrean"
PWD="$ethdir/go-empyrean"
# Launch the arguments with the configured environment.
exec "$@"