build.sh 572 B

123456789101112131415
  1. #! /bin/bash
  2. if [ "$1" == "all" ]
  3. then
  4. echo "Building all"
  5. ~/go/bin/xgo --targets=linux/amd64 $GOPATH/src/github.com/ditcraft/client/
  6. mv client-linux-amd64 binaries/dit-linux-amd64
  7. ~/go/bin/xgo --targets=windows-10/amd64 $GOPATH/src/github.com/ditcraft/client/
  8. mv client-windows-10-amd64.exe binaries/dit-windows-amd64.exe
  9. else
  10. echo "Building only macos"
  11. fi
  12. go build -o binaries/dit-macos-amd64 $GOPATH/src/github.com/ditcraft/client/
  13. cp -rf binaries/dit-macos-amd64 /usr/local/bin/dit
  14. chmod a+x /usr/local/bin/dit