From 8ea1496207752f31d23719eff9058aea1db62946 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jan 2015 13:49:56 +0000 Subject: [PATCH] Install a cjdns tool for administration --- install-freedombone.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index 41e04884..a391eb39 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -819,7 +819,23 @@ function install_cjdns_tools { install_cjdns fi - + apt-get -y install golang mercurial + if [ ! -f ~/.bashrc ]; then + touch ~/.bashrc + fi + if ! grep -q "export GOPATH=" ~/.bashrc; then + echo 'export GOPATH=$HOME/projects/go' >> ~/.bashrc + fi + if ! grep -q "export PATH=$PATH:$HOME/projects/go/bin" ~/.bashrc; then + echo 'export PATH=$PATH:$HOME/projects/go/bin' >> ~/.bashrc + fi + . ~/.bashrc + go get github.com/inhies/cjdcmd + if [ ! -f $HOME/projects/go/bin/cjdcmd ]; then + echo 'cjdcmd was not compiled. Check your golang installation' + exit 7439 + fi + cp $HOME/projects/go/bin/cjdcmd /usr/bin echo 'install_cjdns_tools' >> $COMPLETION_FILE }