Test for gopath
This commit is contained in:
parent
81ed974d4b
commit
ace9bf07c3
|
@ -2638,13 +2638,18 @@ function create_mirrors {
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_go_version {
|
function select_go_version {
|
||||||
if [ ! -d $HOME/.gvm/scripts ]; then
|
if [ ! -d $HOME/.gvm/scripts ]; then
|
||||||
echo $'GVM was not installed'
|
echo $'GVM was not installed'
|
||||||
exit 629532
|
exit 629532
|
||||||
fi
|
fi
|
||||||
cd $HOME/.gvm/scripts
|
cd $HOME/.gvm/scripts
|
||||||
gvm use go${GO_VERSION} --default
|
gvm use go${GO_VERSION} --default
|
||||||
systemctl set-environment GOPATH=$GOPATH
|
systemctl set-environment GOPATH=$GOPATH
|
||||||
|
|
||||||
|
if [ ${#GOPATH} -lt 2 ]; then
|
||||||
|
echo $'GOPATH was not set'
|
||||||
|
exit 629825
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_cjdns_tools {
|
function mesh_cjdns_tools {
|
||||||
|
@ -2658,13 +2663,13 @@ function mesh_cjdns_tools {
|
||||||
mesh_cjdns
|
mesh_cjdns
|
||||||
fi
|
fi
|
||||||
|
|
||||||
select_go_version
|
select_go_version
|
||||||
|
|
||||||
apt-get -y install golang mercurial
|
apt-get -y install golang mercurial
|
||||||
if [ ! -f ~/.bashrc ]; then
|
if [ ! -f ~/.bashrc ]; then
|
||||||
touch ~/.bashrc
|
touch ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /home/git ]; then
|
if [ ! -d /home/git ]; then
|
||||||
# add a gogs user account
|
# add a gogs user account
|
||||||
adduser --disabled-login --gecos 'Gogs' git
|
adduser --disabled-login --gecos 'Gogs' git
|
||||||
|
|
Loading…
Reference in New Issue