Test for gopath
This commit is contained in:
parent
81ed974d4b
commit
ace9bf07c3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue