|
@@ -2638,13 +2638,18 @@ function create_mirrors {
|
2638
|
2638
|
}
|
2639
|
2639
|
|
2640
|
2640
|
function select_go_version {
|
2641
|
|
- if [ ! -d $HOME/.gvm/scripts ]; then
|
2642
|
|
- echo $'GVM was not installed'
|
2643
|
|
- exit 629532
|
2644
|
|
- fi
|
|
2641
|
+ if [ ! -d $HOME/.gvm/scripts ]; then
|
|
2642
|
+ echo $'GVM was not installed'
|
|
2643
|
+ exit 629532
|
|
2644
|
+ fi
|
2645
|
2645
|
cd $HOME/.gvm/scripts
|
2646
|
2646
|
gvm use go${GO_VERSION} --default
|
2647
|
|
- systemctl set-environment GOPATH=$GOPATH
|
|
2647
|
+ systemctl set-environment GOPATH=$GOPATH
|
|
2648
|
+
|
|
2649
|
+ if [ ${#GOPATH} -lt 2 ]; then
|
|
2650
|
+ echo $'GOPATH was not set'
|
|
2651
|
+ exit 629825
|
|
2652
|
+ fi
|
2648
|
2653
|
}
|
2649
|
2654
|
|
2650
|
2655
|
function mesh_cjdns_tools {
|
|
@@ -2658,13 +2663,13 @@ function mesh_cjdns_tools {
|
2658
|
2663
|
mesh_cjdns
|
2659
|
2664
|
fi
|
2660
|
2665
|
|
2661
|
|
- select_go_version
|
|
2666
|
+ select_go_version
|
2662
|
2667
|
|
2663
|
2668
|
apt-get -y install golang mercurial
|
2664
|
2669
|
if [ ! -f ~/.bashrc ]; then
|
2665
|
2670
|
touch ~/.bashrc
|
2666
|
2671
|
fi
|
2667
|
|
-
|
|
2672
|
+
|
2668
|
2673
|
if [ ! -d /home/git ]; then
|
2669
|
2674
|
# add a gogs user account
|
2670
|
2675
|
adduser --disabled-login --gecos 'Gogs' git
|