Parcourir la source

Don't wait for bashrc

Bob Mottram il y a 8 ans
Parent
révision
09bac71090
Aucun compte lié à l'adresse email de l'auteur
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7
    1
      src/freedombone

+ 7
- 1
src/freedombone Voir le fichier

6345
 
6345
 
6346
     # install Go
6346
     # install Go
6347
     apt-get -y install golang libpam0g-dev
6347
     apt-get -y install golang libpam0g-dev
6348
+    export GOPATH=/home/git/go
6348
     if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
6349
     if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
6349
         echo 'export GOPATH=/home/git/go' >> ~/.bashrc
6350
         echo 'export GOPATH=/home/git/go' >> ~/.bashrc
6350
-	fi
6351
+    fi
6352
+    systemctl set-environment GOPATH=/home/git/go
6351
     if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
6353
     if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
6352
         echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
6354
         echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
6353
     fi
6355
     fi
10085
         adduser --disabled-login --gecos 'Gogs' git
10087
         adduser --disabled-login --gecos 'Gogs' git
10086
 
10088
 
10087
         # install Go
10089
         # install Go
10090
+        export GOPATH=/home/git/go
10088
         if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
10091
         if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
10089
             echo 'export GOPATH=/home/git/go' >> ~/.bashrc
10092
             echo 'export GOPATH=/home/git/go' >> ~/.bashrc
10093
+        fi
10094
+        systemctl set-environment GOPATH=/home/git/go
10095
+        if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
10090
             echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
10096
             echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
10091
         fi
10097
         fi
10092
         export GOPATH=/home/git/go
10098
         export GOPATH=/home/git/go