1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-09 13:34:34 -04:00
v2fly/release/install.sh

27 lines
688 B
Bash
Raw Normal View History

2015-09-18 05:19:52 -04:00
#!/bin/bash
2018-10-03 05:48:32 -04:00
GO_AMD64=https://storage.googleapis.com/golang/go1.11.1.linux-amd64.tar.gz
GO_X86=https://storage.googleapis.com/golang/go1.11.1.linux-386.tar.gz
2015-10-02 05:01:12 -04:00
ARCH=$(uname -m)
GO_CUR=${GO_AMD64}
2015-10-02 05:05:44 -04:00
if [ "$ARCH" == "i686" ] || [ "$ARCH" == "i386" ]; then
2015-10-02 05:01:12 -04:00
GO_CUR=${GO_X86}
fi
which git > /dev/null || apt-get install git -y
2015-09-18 05:19:52 -04:00
if [ -z "$GOPATH" ]; then
2015-10-02 05:01:12 -04:00
curl -o go_latest.tar.gz ${GO_CUR}
2015-09-18 05:19:52 -04:00
tar -C /usr/local -xzf go_latest.tar.gz
rm go_latest.tar.gz
export PATH=$PATH:/usr/local/go/bin
mkdir /v2ray &> /dev/null
2015-09-18 05:19:52 -04:00
export GOPATH=/v2ray
fi
2017-06-04 17:08:48 -04:00
go get -u v2ray.com/core/...
2018-10-04 14:44:57 -04:00
go build -o $GOPATH/bin/v2ray v2ray.com/core/main
2019-02-10 15:04:51 -05:00
go build -o $GOPATH/bin/v2ctl v2ray.com/core/infra/control/main