github.com/sagernet/sing-box@v1.9.0-rc.20/release/local/debug.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e -o pipefail
     4  
     5  if [ -d /usr/local/go ]; then
     6    export PATH="$PATH:/usr/local/go/bin"
     7  fi
     8  
     9  DIR=$(dirname "$0")
    10  PROJECT=$DIR/../..
    11  
    12  pushd $PROJECT
    13  git fetch
    14  git reset FETCH_HEAD --hard
    15  git clean -fdx
    16  go install -v -trimpath -ldflags "-s -w -buildid=" -tags with_quic,with_acme,debug ./cmd/sing-box
    17  popd
    18  
    19  sudo systemctl stop sing-box
    20  sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
    21  sudo systemctl start sing-box
    22  sudo journalctl -u sing-box --output cat -f