GOPATH set as systemd environment variable
This commit is contained in:
parent
49a1c7bdc5
commit
a5e4a59e14
|
@ -6715,7 +6715,10 @@ function install_gogs {
|
||||||
|
|
||||||
# install Go
|
# install Go
|
||||||
apt-get -y install golang
|
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
|
. ~/.bashrc
|
||||||
export GOPATH=/home/git/go
|
export GOPATH=/home/git/go
|
||||||
if [ ! -d $GOPATH ]; then
|
if [ ! -d $GOPATH ]; then
|
||||||
|
|
Loading…
Reference in New Issue