Test for gopath

This commit is contained in:
Bob Mottram 2016-04-29 14:22:28 +01:00
parent 81ed974d4b
commit ace9bf07c3
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 12 additions and 7 deletions

View File

@ -2638,13 +2638,18 @@ function create_mirrors {
}
function select_go_version {
if [ ! -d $HOME/.gvm/scripts ]; then
echo $'GVM was not installed'
exit 629532
fi
if [ ! -d $HOME/.gvm/scripts ]; then
echo $'GVM was not installed'
exit 629532
fi
cd $HOME/.gvm/scripts
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 {
@ -2658,13 +2663,13 @@ function mesh_cjdns_tools {
mesh_cjdns
fi
select_go_version
select_go_version
apt-get -y install golang mercurial
if [ ! -f ~/.bashrc ]; then
touch ~/.bashrc
fi
if [ ! -d /home/git ]; then
# add a gogs user account
adduser --disabled-login --gecos 'Gogs' git