diff --git a/src/freedombone b/src/freedombone index 7de969cd..092b535d 100755 --- a/src/freedombone +++ b/src/freedombone @@ -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