build: fix path_check for symlink-into-gopath usecase
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
Mar 10, 2016 at 19:23 UTC
7d67b0a69c06b7c3e02d4b5455199ad560a0d002
2 files changed
+2
-3
Makefile
+1
-1
@@ -29,7 +29,7 @@ gxgo_upgrade:
29
go get -u github.com/whyrusleeping/gx-go
30
31
path_check:
32
- @bin/check_go_path $(realpath $(shell pwd))
32
+ @bin/check_go_path $(realpath $(shell pwd)) $(realpath $(GOPATH)/src/github.com/ipfs/go-ipfs)
33
34
gx_check:
35
@bin/check_gx_program "gx" "0.3" 'Upgrade or install gx using your package manager or run `make gx_upgrade`'
bin/check_go_path
+1
-2
@@ -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,8 +13,6 @@ if [ -z "$GOPATH" ]; then
13
exit 1
14
fi
15
15
-EXPECTED="$GOPATH/src/github.com/ipfs/go-ipfs"
16
-
16
if [ "$PWD" != "$EXPECTED" ]; then
17
echo "go-ipfs must be built from within your \$GOPATH directory."
18
echo "expected '$EXPECTED' but got '$PWD'"