Browse Source

fixing GOPATH

dev
rootzoll 6 years ago
parent
commit
b32d056362
  1. 8
      build.sdcard/raspbianStretchDesktop.sh
  2. 14
      home.admin/97addMobileWalletZap.sh

8
build.sdcard/raspbianStretchDesktop.sh

@ -440,6 +440,14 @@ sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/
sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/
sudo -u admin chmod +x /home/admin/config.scripts/*.sh
# prifile path for admin
sudo bash -c "echo '' >> /home/admin/.profile"
sudo bash -c "echo 'GOROOT=/usr/local/go' >> /home/admin/.profile"
sudo bash -c "echo 'PATH=\$PATH:\$GOROOT/bin' >> /home/admin/.profile"
sudo bash -c "echo 'GOPATH=/usr/local/gocode' >> /home/admin/.profile"
sudo bash -c "echo 'PATH=\$PATH:\$GOPATH/bin' >> /home/admin/.profile"
# bash aoutstart for admin
sudo bash -c "echo '# shortcut commands' >> /home/admin/.bashrc"
sudo bash -c "echo 'source /home/admin/_commands.sh' >> /home/admin/.bashrc"

14
home.admin/97addMobileWalletZap.sh

@ -3,11 +3,15 @@
# load raspiblitz config data
source /mnt/hdd/raspiblitz.conf
# export go vars
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/usr/local/gocode
export PATH=$PATH:$GOPATH/bin
# export go vars (if needed)
if [ ${#GOROOT} -eq 0 ]; then
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
fi
if [ ${#GOPATH} -eq 0 ]; then
export GOPATH=/usr/local/gocode
export PATH=$PATH:$GOPATH/bin
fi
# precheck if go is installed
result=$(command -v go >/dev/null 2>/dev/null)

Loading…
Cancel
Save