Don't wait for bashrc
This commit is contained in:
parent
09bac71090
commit
0d77074a93
|
@ -2657,8 +2657,12 @@ function mesh_cjdns_tools {
|
|||
adduser --disabled-login --gecos 'Gogs' git
|
||||
|
||||
# install Go
|
||||
export GOPATH=/home/git/go
|
||||
if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
|
||||
echo 'export GOPATH=/home/git/go' >> ~/.bashrc
|
||||
fi
|
||||
systemctl set-environment GOPATH=/home/git/go
|
||||
if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
|
||||
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
|
||||
fi
|
||||
if [ ! -d $GOPATH ]; then
|
||||
|
@ -2666,12 +2670,13 @@ function mesh_cjdns_tools {
|
|||
fi
|
||||
fi
|
||||
|
||||
export GOPATH=$GOPATH
|
||||
if ! grep -q "export GOPATH=" ~/.bashrc; then
|
||||
echo "export GOPATH=$GOPATH" >> ~/.bashrc
|
||||
fi
|
||||
expected_go_path='export PATH=$PATH:'${GOPATH}'/bin'
|
||||
if ! grep -q "$expected_go_path" ~/.bashrc; then
|
||||
export PATH=$PATH:${GOPATH}/bin
|
||||
if ! grep -q "$expected_go_path" ~/.bashrc; then
|
||||
echo "$expected_go_path" >> ~/.bashrc
|
||||
fi
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
|
@ -10102,8 +10107,8 @@ function install_ipfs {
|
|||
fi
|
||||
|
||||
IPFS_PATH=/home/git/go/bin
|
||||
if ! grep -q 'GOPATH/bin' ~/.bashrc; then
|
||||
export PATH="$GOPATH/bin:$PATH:"
|
||||
if ! grep -q 'GOPATH/bin' ~/.bashrc; then
|
||||
echo 'export PATH="$GOPATH/bin:$PATH:";' >> ~/.bashrc
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue