From 8c125115abf5fe64c390d1856d5bca5143a06125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E9=B9=A4?= Date: Tue, 15 Jan 2019 12:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC=E9=80=9A?= =?UTF-8?q?=E8=BF=87go=20env=E8=8E=B7=E5=8F=96GOPATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index baed18e..ec1b58b 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,10 @@ if [ -d ${install_path} ];then install_path=${install_path}-$( date +%Y%m%d%H%M%S ) fi +if [ -z ${GOPATH} ];then + GOPATH=`go env GOPATH` +fi + build_syncd() { go get ${build_repo} cd $GOPATH/src/${build_repo}