Skip to content

Commit 2a3bba3

Browse files
Merge pull request #2862 from ipfs/revert-multi-gopath
Revert "Makefile, bin: Support multiple GOPATH components"
2 parents 0f3ae07 + ad461c6 commit 2a3bba3

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bin/gx-go-v%:
4141
gx_check: ${gx_bin} ${gx-go_bin}
4242

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

4646
deps: go_check gx_check path_check
4747
${gx_bin} --verbose install --global

bin/check_go_path

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
PWD=$1
4+
EXPECTED=$2
45

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

15-
while [ ${#} -gt 1 ]; do
16-
if [ "$PWD" = "$2" ]; then
17-
exit 0
18-
fi
19-
shift
20-
done
21-
22-
echo "go-ipfs must be built from within your \$GOPATH directory."
23-
echo "expected within '$GOPATH' but got '$PWD'"
24-
exit 1
16+
if [ "$PWD" != "$EXPECTED" ]; then
17+
echo "go-ipfs must be built from within your \$GOPATH directory."
18+
echo "expected '$EXPECTED' but got '$PWD'"
19+
exit 1
20+
fi

0 commit comments

Comments
 (0)