Selaa lähdekoodia

GOPATH set as systemd environment variable

Bob Mottram 10 vuotta sitten
vanhempi
commit
a5e4a59e14
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4
    1
      src/freedombone

+ 4
- 1
src/freedombone Näytä tiedosto

@@ -6715,7 +6715,10 @@ function install_gogs {
6715 6715
 
6716 6716
   # install Go
6717 6717
   apt-get -y install golang
6718
-  echo 'export GOPATH=/home/git/go' >> ~/.bashrc
6718
+  if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
6719
+      echo 'export GOPATH=/home/git/go' >> ~/.bashrc
6720
+      echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
6721
+  fi
6719 6722
   . ~/.bashrc
6720 6723
   export GOPATH=/home/git/go
6721 6724
   if [ ! -d $GOPATH ]; then