From a5e4a59e142490fccc264483a8a29ab374219fd4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 5 Apr 2015 10:06:36 +0100 Subject: [PATCH] GOPATH set as systemd environment variable --- src/freedombone | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedombone b/src/freedombone index 3834345b..f437ff0a 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6715,7 +6715,10 @@ function install_gogs { # install Go apt-get -y install golang - echo 'export GOPATH=/home/git/go' >> ~/.bashrc + if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then + echo 'export GOPATH=/home/git/go' >> ~/.bashrc + echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc + fi . ~/.bashrc export GOPATH=/home/git/go if [ ! -d $GOPATH ]; then