debug.sh 420 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -e -o pipefail
  3. DIR=$(dirname "$0")
  4. PROJECT=$DIR/../..
  5. pushd $PROJECT
  6. git fetch
  7. git reset FETCH_HEAD --hard
  8. git clean -fdx
  9. go install -v -trimpath -ldflags "-s -w -buildid=" -tags no_gvisor,with_quic,with_acme,debug ./cmd/sing-box
  10. popd
  11. sudo systemctl stop sing-box
  12. sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
  13. sudo systemctl start sing-box
  14. sudo journalctl -u sing-box --output cat -f