diff --git a/build.sdcard/raspbianStretchDesktop.sh b/build.sdcard/raspbianStretchDesktop.sh index 954b36e..1a5107f 100644 --- a/build.sdcard/raspbianStretchDesktop.sh +++ b/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" diff --git a/home.admin/97addMobileWalletZap.sh b/home.admin/97addMobileWalletZap.sh index a98dcda..a942db3 100755 --- a/home.admin/97addMobileWalletZap.sh +++ b/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)