build.sh 579 B

12345678910111213141516171819202122
  1. export LANG=zh_CN.utf8
  2. export LC_ALL=zh_CN.utf8
  3. installpath=`go env GOPATH | awk -F ':' '{print $1}'`/bin
  4. #改变工作目录到当前脚本所在路径
  5. if [[ "$0" =~ / ]]; then cd "${0%/*}"; fi
  6. cd ./mssh
  7. CGO_ENABLED=0 GOOS=windows go build -o ../bin/mssh.exe
  8. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../bin/mssh
  9. CGO_ENABLED=0 go build -o ../bin/mssh_mac
  10. cd ..
  11. cd ./msh
  12. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../bin/msh
  13. CGO_ENABLED=0 go build -o ../bin/msh_mac
  14. cd ..
  15. cp ./bin/* ${installpath}/matrix/zerone/
  16. echo copied to ${installpath}/matrix/zerone/