blob: fcb2d5169d4224aa30b6569f3c3e25f80fa2c66b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
function install_go {
local golang_version=go1.10.linux-amd64
if [ ! -d /opt/go ]; then
mkdir /opt/go
pushd /opt/go
curl -O https://dl.google.com/go/$golang_version.tar.gz
tar -zxf $golang_version.tar.gz
echo GOROOT=$PWD/go >> /etc/environment
echo PATH=$PATH:$PWD/go/bin >> /etc/environment
rm -rf tar -zxf $golang_version.tar.gz
popd
fi
source /etc/environment
}
function install_dependencies {
pushd src/dkv/
make all
popd
}
function create_mountpath {
cp -r mountpath/ /configs
}
install_go
install_dependencies
create_mountpath
|