From 7d67b0a69c06b7c3e02d4b5455199ad560a0d002 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Thu, 10 Mar 2016 19:23:12 +0100 Subject: [PATCH] build: fix path_check for symlink-into-gopath usecase License: MIT Signed-off-by: Lars Gierth --- Makefile | 2 +- bin/check_go_path | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3c287b773..736550f8a 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ gxgo_upgrade: go get -u github.com/whyrusleeping/gx-go path_check: - @bin/check_go_path $(realpath $(shell pwd)) + @bin/check_go_path $(realpath $(shell pwd)) $(realpath $(GOPATH)/src/github.com/ipfs/go-ipfs) gx_check: @bin/check_gx_program "gx" "0.3" 'Upgrade or install gx using your package manager or run `make gx_upgrade`' diff --git a/bin/check_go_path b/bin/check_go_path index cc78615a5..b34660e3c 100755 --- a/bin/check_go_path +++ b/bin/check_go_path @@ -1,6 +1,7 @@ #!/bin/sh PWD=$1 +EXPECTED=$2 if [ -z "$PWD" ]; then echo "must pass in your current working directory" @@ -12,8 +13,6 @@ if [ -z "$GOPATH" ]; then exit 1 fi -EXPECTED="$GOPATH/src/github.com/ipfs/go-ipfs" - if [ "$PWD" != "$EXPECTED" ]; then echo "go-ipfs must be built from within your \$GOPATH directory." echo "expected '$EXPECTED' but got '$PWD'"