@cryptotaxi247 / kubo / commits / ad461c611

Revert "Makefile, bin: Support multiple GOPATH components"

This reverts commit ff75bc0318579fa743a35d316c61d2f8c4ab92ce, which broke building on windows. See ipfs/go-ipfs#2833. License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>

Lars Gierth committed Jun 17, 2016 at 15:30 UTC ad461c611e01633da0e8332d01ea6a43d1519545
2 files changed +7 -11
Makefile
+1 -1
@@ -41,7 +41,7 @@ bin/gx-go-v%:
41 gx_check: ${gx_bin} ${gx-go_bin}
42
43 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)
45
46 deps: go_check gx_check path_check
47 ${gx_bin} --verbose install --global
bin/check_go_path
+6 -10
@@ -1,6 +1,7 @@
1 #!/bin/sh
2
3 PWD=$1
4 +EXPECTED=$2
5
6 if [ -z "$PWD" ]; then
7 echo "must pass in your current working directory"
@@ -12,13 +13,8 @@ if [ -z "$GOPATH" ]; then
13 exit 1
14 fi
15
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