提交 dbc1d3f2 作者: Péter Szilágyi 提交者: Dominic Della Valle

Makefile, bin: Support multiple GOPATH components

License: MIT
Signed-off-by: 's avatarPéter Szilágyi <peterke@gmail.com>
上级 8fbbd7f7
......@@ -41,7 +41,7 @@ bin/gx-go-v%:
gx_check: ${gx_bin} ${gx-go_bin}
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
${gx_bin} --verbose install --global
......
#!/bin/sh
PWD=$1
EXPECTED=$2
if [ -z "$PWD" ]; then
echo "must pass in your current working directory"
......@@ -13,8 +12,13 @@ if [ -z "$GOPATH" ]; then
exit 1
fi
if [ "$PWD" != "$EXPECTED" ]; then
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected '$EXPECTED' but got '$PWD'"
exit 1
fi
while [ ${#} -gt 1 ]; do
if [ "$PWD" = "$2" ]; then
exit 0
fi
shift
done
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected within '$GOPATH' but got '$PWD'"
exit 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论