mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-23 05:35:58 +08:00
Makefile, bin: Support multiple GOPATH components
License: MIT Signed-off-by: Péter Szilágyi <peterke@gmail.com>
This commit is contained in:

committed by
Dominic Della Valle

parent
8fbbd7f711
commit
dbc1d3f2d3
2
Makefile
2
Makefile
@ -41,7 +41,7 @@ bin/gx-go-v%:
|
|||||||
gx_check: ${gx_bin} ${gx-go_bin}
|
gx_check: ${gx_bin} ${gx-go_bin}
|
||||||
|
|
||||||
path_check:
|
path_check:
|
||||||
@bin/check_go_path $(realpath $(shell pwd)) $(realpath $(GOPATH)/src/github.com/ipfs/go-ipfs)
|
@bin/check_go_path $(realpath $(shell pwd)) $(realpath $(addsuffix /src/github.com/ipfs/go-ipfs,$(subst :, ,$(GOPATH))))
|
||||||
|
|
||||||
deps: go_check gx_check path_check
|
deps: go_check gx_check path_check
|
||||||
${gx_bin} --verbose install --global
|
${gx_bin} --verbose install --global
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PWD=$1
|
PWD=$1
|
||||||
EXPECTED=$2
|
|
||||||
|
|
||||||
if [ -z "$PWD" ]; then
|
if [ -z "$PWD" ]; then
|
||||||
echo "must pass in your current working directory"
|
echo "must pass in your current working directory"
|
||||||
@ -13,8 +12,13 @@ if [ -z "$GOPATH" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PWD" != "$EXPECTED" ]; then
|
while [ ${#} -gt 1 ]; do
|
||||||
echo "go-ipfs must be built from within your \$GOPATH directory."
|
if [ "$PWD" = "$2" ]; then
|
||||||
echo "expected '$EXPECTED' but got '$PWD'"
|
exit 0
|
||||||
exit 1
|
fi
|
||||||
fi
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "go-ipfs must be built from within your \$GOPATH directory."
|
||||||
|
echo "expected within '$GOPATH' but got '$PWD'"
|
||||||
|
exit 1
|
||||||
|
Reference in New Issue
Block a user