Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Makefile, bin: Support multiple GOPATH components" #2862

Merged
merged 1 commit into from
Jun 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bin/gx-go-v%:
gx_check: ${gx_bin} ${gx-go_bin}

path_check:
@bin/check_go_path $(realpath $(shell pwd)) $(realpath $(addsuffix /src/github.com/ipfs/go-ipfs,$(subst :, ,$(GOPATH))))
@bin/check_go_path $(realpath $(shell pwd)) $(realpath $(GOPATH)/src/github.com/ipfs/go-ipfs)

deps: go_check gx_check path_check
${gx_bin} --verbose install --global
Expand Down
16 changes: 6 additions & 10 deletions bin/check_go_path
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

PWD=$1
EXPECTED=$2

if [ -z "$PWD" ]; then
echo "must pass in your current working directory"
Expand All @@ -12,13 +13,8 @@ if [ -z "$GOPATH" ]; then
exit 1
fi

while [ ${#} -gt 1 ]; do
if [ "$PWD" = "$2" ]; then
exit 0
fi
shift
done

echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected within '$GOPATH' but got '$PWD'"
exit 1
if [ "$PWD" != "$EXPECTED" ]; then
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected '$EXPECTED' but got '$PWD'"
exit 1
fi