mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
25 lines
543 B
Bash
Executable file
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 "$@"
|