|
@@ -819,7 +819,23 @@ function install_cjdns_tools {
|
819
|
819
|
install_cjdns
|
820
|
820
|
fi
|
821
|
821
|
|
822
|
|
-
|
|
822
|
+ apt-get -y install golang mercurial
|
|
823
|
+ if [ ! -f ~/.bashrc ]; then
|
|
824
|
+ touch ~/.bashrc
|
|
825
|
+ fi
|
|
826
|
+ if ! grep -q "export GOPATH=" ~/.bashrc; then
|
|
827
|
+ echo 'export GOPATH=$HOME/projects/go' >> ~/.bashrc
|
|
828
|
+ fi
|
|
829
|
+ if ! grep -q "export PATH=$PATH:$HOME/projects/go/bin" ~/.bashrc; then
|
|
830
|
+ echo 'export PATH=$PATH:$HOME/projects/go/bin' >> ~/.bashrc
|
|
831
|
+ fi
|
|
832
|
+ . ~/.bashrc
|
|
833
|
+ go get github.com/inhies/cjdcmd
|
|
834
|
+ if [ ! -f $HOME/projects/go/bin/cjdcmd ]; then
|
|
835
|
+ echo 'cjdcmd was not compiled. Check your golang installation'
|
|
836
|
+ exit 7439
|
|
837
|
+ fi
|
|
838
|
+ cp $HOME/projects/go/bin/cjdcmd /usr/bin
|
823
|
839
|
|
824
|
840
|
echo 'install_cjdns_tools' >> $COMPLETION_FILE
|
825
|
841
|
}
|