test.sh 506 B

1234567891011121314151617
  1. export LANG=zh_CN.utf8
  2. export LC_ALL=zh_CN.utf8
  3. #改变工作目录到当前脚本所在路径
  4. if [[ "$0" =~ / ]]; then cd "${0%/*}"; fi
  5. export CWD=`pwd`
  6. installpath=`go env GOPATH | awk -F ':' '{print $1}'`/bin
  7. echo build linux
  8. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -o ${installpath}/linux_amd64/chat -c -args
  9. ftptarget=${installpath}/linux_amd64/chat
  10. msh "sftp matrix@47.92.151.165" p=NatsEtcdParser "put $ftptarget"
  11. msh "ssh matrix@47.92.151.165" p=NatsEtcdParser "./chat" x='^.*\]\$ $'