Install script now checks for $GOPATH/bin in $PATH

This commit is contained in:
Eduard Urbach 2018-06-28 19:38:59 +09:00
parent f0c280af1a
commit 027fea7836

View File

@ -3,7 +3,13 @@
echo "Checking prerequisites..."
if hash go 2>/dev/null; then
go version
if [[ ":$PATH:" == *":$GOPATH/bin:"* || ":$PATH:" == *":$GOPATH/bin/:"* ]]; then
go version
else
echo "Your \$PATH is missing \$GOPATH/bin, you should add this to your ~/.profile:"
echo "export PATH=\$PATH:/usr/local/go/bin:\$GOPATH/bin"
exit
fi
else
echo "Go is not installed"
exit